Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Simple Image Gallery Plugin Pro - Not XHTML Valid?

More
17 years 3 months ago #3320 by Patrick Frithiof
Replied by Patrick Frithiof on topic Re: Simple Image Gallery Plugin Pro - Not XHTML Valid?
Hi!

I still don't get it.... it does not validate for me, and I receive these errors:
- XML Parsing Error: Unescaped '<' not allowed in attributes values
- XML Parsing Error: attributes construct error
- XML Parsing Error: Couldn't find end of Start Tag a line 185
- XML Parsing Error: Opening and ending tag mismatch: div line 185 and a

What is wrong??

BR, P

Please Log in or Create an account to join the conversation.

More
17 years 3 months ago #3321 by JoomlaWorks
It's because you add the galleries using your WYSIWYG editor. Such editors -unless fine tuned- generate <p> tags everytime you hit "enter" to change line. So, you wrote something like:
This is a cool article

Right below is my gallery
{gallery}photos{/gallery}

and some more text

So, right after "This is a cool article" you hit enter to change lines, correct? This action of yous generated <p> tags. Now, SIG Pro transforms the {gallery}photos{/gallery} tags to a few <div> elements. This is where validation fails.

You are not allowed to have <div> tags inside <p> tags. That's all. But this does not mean the site doesn't work? Validation is something not to be taken into consideration 100% of the times, especially when you deal with complex CMSs like Joomla...  ;)

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
17 years 3 months ago #3322 by Patrick Frithiof
Replied by Patrick Frithiof on topic Re: Simple Image Gallery Plugin Pro - Not XHTML Valid?
Nope!
It has nothing to do with <p> tags at all....

The site works, sure... BUT, it has to validate in order to get accepted by all major search engines! And this is vital to my customer...

So you see, I need a solution and I can't find any better image gallery than SIG Pro  ;). What confuses me is that all other users seems to be able to validate it. Please have a look at this page: www.arizona.se/www2/index.php?option=com_content&task=view&id=17&Itemid=49

Please Log in or Create an account to join the conversation.

More
17 years 3 months ago #3323 by JoomlaWorks
But I'm seeing the code man. You got this...
<p>
  <div>...</div>
</p>

This is what doesn't validate. The order in which elements are enclosed. You can have p elements inside div elements but you can't have div elements inside p elements!

Anyway, the search issue is totally unrealistic. Search engines are smarter than you think, especially google.  ;)

Your galleries are just fine. Validation is required in case you're building a public sector website in Sweden, where they got strict laws and stuff. That's all.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
17 years 3 months ago #3324 by Patrick Frithiof
Replied by Patrick Frithiof on topic Re: Simple Image Gallery Plugin Pro - Not XHTML Valid?
OK, now you've made me curious...
WHERE oh where, do you see that code??  ???

I don't see it in my WYSIWYG editor AND I don't see it when I view the source of the page!
<!-- JW "Simple Image Gallery PRO" Plugin (v1.2) starts here -->
<div id="sigid0" class="sig"><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/gourmetpizzor.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/a64af26e43ef95a5105da28a10d0719e.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/klickbilagan.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/15f56e514ac75dc509a1ee88f4d27f6c.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/klicknotis.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/b6000e124d2f02c0a0a768f7b8f8b3a2.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/mamma_mia.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/862fbafd687080ab9500d6bc199035d9.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/menynr4.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/6ea91a46993a91f4777584ce5273b940.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/nguiden.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/d14cbdcda36da1b3884d90ae22bbf904.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/nu.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/74deb15a4478b26fb4fc4e6659e1c6e1.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/pricardarizona.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/80dd68589d68c794f33529c58442694a.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/svenskdam.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/98075a2cec1bd6c8b3d0b2b450901293.jpg" /></a></div></div><div class="sig_cont"><div class="sig_thumb"><a href="http://www.arizona.se/www2/images/stories/gallery/pressklipp/veckansnu.jpg" class="thickbox" rel="lightbox[sig0]" title="Du tittar på bilder från galleriet:
<b>Pressklipp</b>" target="_blank"><img alt="Klicka på bilden för att öppna!" title="Klicka på bilden för att öppna!" src="http://www.arizona.se/www2/images/stories/temp/3c96bb31be8afdb9967f1a355983b0e6.jpg" /></a></div></div>
<div class="sig_clr"></div>
</div>
<!-- JW "Simple Image Gallery PRO" Plugin (v1.2) ends here -->

Please Log in or Create an account to join the conversation.

More
17 years 1 month ago #3325 by Electrophoton
Replied by Electrophoton on topic Re: Simple Image Gallery Plugin Pro - Not XHTML Valid?

Hi!

I still don't get it.... it does not validate for me, and I receive these errors:
- XML Parsing Error: Unescaped '<' not allowed in attributes values
- XML Parsing Error: attributes construct error
- XML Parsing Error: Couldn't find end of Start Tag a line 185
- XML Parsing Error: Opening and ending tag mismatch: div line 185 and a

What is wrong??

BR, P


I think I might have a solution to this problem. The code needs to be changed from using
to &lt;br /&gt; for it to parse XHTML validation.

So in mambots/content/plugin_jw_sigpro.php
// if labels don't exist
if (!$labels) {
	// display nice message?
	if ($displaymessage) {
		if ($popup_engine == 'greybox') {
		$html .= '<b>'.$itemtitle.'</b>'; // remove nice messages for greybox
		} else {
			$html .= $message.'
<b>'.$itemtitle.'</b>';
		}
	} else {
		$html .= '<b>'.$images[$a].'</b>';
	}
}
				
// if labels do exist
if ($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]!="") {
	$html .= '<b>'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])],ENT_QUOTES).'</b>';
}

Should be
// if labels don't exist
if (!$labels) {
	// display nice message?
	if ($displaymessage) {
		if ($popup_engine == 'greybox') {
			$html .= '&lt;b&gt;'.$itemtitle.'&lt;/b&gt;'; // remove nice messages for Greybox
		} else {
			$html .= $message.'&lt;br /&gt;&lt;b&gt;'.$itemtitle.'&lt;/b&gt;';
		}
	} else {
		$html .= '&lt;b&gt;'.$images[$a].'&lt;/b&gt;';
	}
}
				
// if labels do exist
if ($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]!="") {
	$html .= '&lt;b&gt;'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])],ENT_QUOTES).'&lt;/b&gt;';
}

This worked for me and now the XHTML validates, I hope this helps.

Please Log in or Create an account to join the conversation.

More
16 years 11 months ago #3326 by boatred
Hi,

Followed this thread and fixed some issues but I am getting this when validating.

Line 102, Column 35: document type does not allow element "style" here.
<style type="text/css" media="all">

This relates to
<style type="text/css" media="all">
	.sig_cont .sig_thumb a span.sig_pseudocaption,.sig_cont .sig_thumb a:hover span.sig_pseudocaption {bottom:10px;left:0px;}
	.sig_cont .sig_thumb a span.sig_caption,.sig_cont .sig_thumb a:hover span.sig_caption {bottom:10px;left:0px;}
	</style>
	<![endif]-->

	<!--[if lte IE 6]>
	<style type="text/css" media="all">
	.sig_cont .sig_thumb a span.sig_pseudocaption,.sig_cont .sig_thumb a:hover span.sig_pseudocaption {bottom:5px;left:5px;}
	.sig_cont .sig_thumb a span.sig_caption,.sig_cont .sig_thumb a:hover span.sig_caption {bottom:5px;left:5px;}
	</style>

Line 120, Column 36: document type does not allow element "style" here.
<style type="text/css" media="all">#sigid0.sig .sig_cont {width:210px;height:1

This relates to
$sigdata = '<style type="text/css" media="all">#sigid'.$sigcount.'.sig .sig_cont {width:'.($_width_final_+20).'px;height:'.($_height_final_+20).'px;}</style>';
		echo $sigdata;

I could try and move the styles to the main index.php but wanted to know if this had been seen before.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum