Imageblock: XML Parsing Error [SOLVED]
geddeth
Joined: 2004-05-16
Posts: 52 |
Posted: Sun, 2007-09-30 15:04 |
When I use the g2_sidebarimageblock()-function in my WP sidebar template, I get faulty (X)HTML output. The W3C Validator says "XML Parsing Error: attributes construct error". I get HTML similar to this: <div class="wpg2sidebarblock-image"> <table class="ImageFrame_shadow" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="LLT"> </td> <td rowspan="2" colspan="2" class="IMG"> <a href="http://example.com/wpg2" title="Gallery"> <img src="http://example.com/gallery/d/31-2/.jpg" width="150" height="150" id="IFid1" class="ImageFrame_image" alt="Gallery" longdesc="This is the main page of your Gallery"/> </a> </td> <td class="RRT"> </td> </tr> <tr> <td class="LL"style="height:140px"> <div class="V"> </div> </td>
Note the missing spaces after I'm using Wordpress 2.3 from SVN, Gallery 2 from the /branches/BRANCH_2_2-branch. I'm using WPG2 RC Final and the WordpressEmbedded theme from here. Thanks! |
|
Posts: 1378
Hmm I wonder if it is something in your Gallery2 ImageFrames that is throwing out the XHTML, as I know WPG2 3.0 is XHTML valid output (you are welcome to check my testbed (http://www.blogyourphotos.com/) which is XHTML Valid)
I could be a bug in the frame, what kind of Imageframe are you using??
____________________________________
Wordpress / Gallery2 (WPG2) Author
Posts: 52
It does indeed seem to be an Imageframe problem. If I go to the WPG2 > Sidebar Block tab and select Sidebar Item Frame: None, the HTML is not generated and I do not get that error.
And the same HTML error is created in G2 itself, so this is a Gallery problem (probably only in SVN, I'll investigate that). Thanks for putting me on the right track!
G.
Posts: 5
Hi Geddeth,
How did you resolve this? I've got the same problem, but I'm struggling to find the right code/module to change.
Many Thanks
Posts: 492
There's an error in gallery2/modules/imageframe/templates/containers/ImageFrame.tpl
You need to add spaces between the class declaration and the if statement on the following lines so that they look like this:
EDIT: This was already fixed in SVN rev 16871. The above fix will work until G2 2.3 comes out.
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 5
worked perfectly, thank you