Page 1 of 3

I have a strange pro

Posted: 29 May 2008, 20:10
by Pinhead
I have a strange problem here, and would be very grateful if you could solve it.
The problem is that in Opera and Firefox the page looks fine, but in IE the css gets ignored and I see the ugly internals. I have tracked the problem down to understanding that it's caused by the same line of code appearing too many times in the page's source. Here is what I have as a result in the source ocde of my frontpage.

<style type="text/css">

</style>

<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>
<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>
<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>
<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->

<style type="text/css">

</style>
<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>
<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>
<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>

<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>
<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>
<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>
<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->

<style type="text/css">

</style>
<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>
<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>
<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>

<!--[if IE]>
<link rel="stylesheet" href="/newzhesht/components/com_phocagallery/assets/phocagall
eryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>



I've noticed that if I leave only one copy of that code in my local version of the website that I "saved as", the page looks fine in IE. Now, the question is what makes the code dublicated that many times, and what can I do to fix it!

Here's the actual page
http://www.pinhead.website.am/newzhesht

Thanks a lot in advance!

I just noticed somet

Posted: 29 May 2008, 20:21
by Pinhead
I just noticed something! The number of dublicate codes is equal to the items that I have on the front page! I just checked it, put only 5 items on the frontpage, and now it looks fine in IE, and in the source code there are 5 dublicates of the code.
I guess IE just refuses to show a proper website after it parses the same code for n-th time (maybe 10?)

Anyway, so it means that a single instance of that code comes with every posted content item

Hi, which version of

Posted: 30 May 2008, 00:42
by Jan
Hi, which version of plugin do you use?

jan

Hi Jan,(

Posted: 01 Jun 2008, 11:51
by chipsfrisch
Hi Jan,

(sorry for my English)

I've detected the same problem using Phoca 1.81 and now new 1.85 with Joomla 1.53 in legacy mode.

Depending on showed articles on the page (not only frontpage) Phoca adds the same amount of the code fragement:
<!--[if IE]>
<link rel="stylesheet" href="/components/com_phocagallery/assets/phocagalleryieall.css" type="text/css" />
<![endif]-->
<style type="text/css">

</style>

This is ok for Firefox but IE isnt able to show the site with its usual design.

I will generate a menu "PHOCA" on the page URL so you can check it with IE.

What part of phoca generates this code severeal times?

Thx for help
Micha

It seems that there

Posted: 01 Jun 2008, 12:21
by chipsfrisch
It seems that there are several possible add-points:

Each view.html.php adds the code.

These files can be found in
\front\views\categories
\front\views\category
\views\phocagalleryf
\views\phocagalleryi
\views\phocagallerys

One of these is wrong, isn't it?

I've edited the

Posted: 01 Jun 2008, 12:46
by chipsfrisch
I've edited the
view.html.php

online in the folders
\view\categories
\view\category


and removed (//) the part, but that didnt change any.

Perhaps a plugin is responsible?

Ok, PROBLEM SOLVED

Posted: 01 Jun 2008, 13:34
by chipsfrisch
Ok, PROBLEM SOLVED

It was the plugin:

Edit the file
\plugins\content\phocagallery.php

Remove the lines 1583-1599:

// All custom CSS tags will be added into one CSS area

// $document->addCustomTag( "<style type=\"text/css\">\n"

// . $customCSS2 . "\n"

// . $customCSS

// ." </style>\n");





//END CSS

// $document->addCustomTag("<!--[if IE]>\n<link rel=\"stylesheet\" href=\"".JURI::base(true)."/components/com_phocagallery/assets/phocagalleryieall.css\ " type=\"text/css\" />\n<![endif]-->");



Thats it.

Hope so.

Hi, THANK YOU

Posted: 01 Jun 2008, 17:50
by totcamping
Hi,
THANK YOU VERY MUCH

have a nice day, a week, and all the year, I was very tired of this problem.

chipsfrisch

Posted: 01 Jun 2008, 20:55
by Jan
chipsfrisch
Hi, you have disabled the IE CSS for the Phoca Gallery plugin (nothing more)... The reason, why there are so many IE CSS links, is that you run the plugin more times... (please don't change anything in the component, the component doesn't hang together with the plugin...

So if you delete the CSS, no CSS for IE will be enabled...

the problem is, you call the plugin more times, it is the same as if you call e.g. 10 different plugins. Every from them will loaded own CSS style... Then next proplem is that there is no way how to recognize that 1 instance of plugin is loaded and no more CSS link to IE should be created ...

Hi Jan,t

Posted: 01 Jun 2008, 21:15
by chipsfrisch
Hi Jan,

thank you for your reply.
Waited for a professional comment by you!

But I dont know if you are right?!

Didnt change any to the component only the plugin as written above.

I didnt load the plugin more than 1 time.
The plugin seems to get loaded for each article that has to be published on the side.
So you have 10(+1) IE-CSS parts in the html-page if you have 10 (un-)posted articles in blog-style in a category or section.

As the problem seems to be solved and IE makes now a correct layout and NOT before deleting these lines I think the plugin should add the CSS parts in a different way.

If you agree there was a problem with the added CSS lines.

Tell me how to reduce the instances of the plugin and I will do it.
Just searched here the last 15 hours (ok, i'm slow) to find the problem.

Thank you for your great plugin and component by the way.
So far it is the best thing on the homepage, i think.

greetings
micha