Invalid Markup with multiple instances of random image mod

Phoca Gallery modules - modules for Phoca Gallery extension
OrionKC
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 02 Nov 2009, 06:57

Invalid Markup with multiple instances of random image mod

Post by OrionKC »

I have three instances of Phoca Gallery Random Image Module on a page (each from different galleries) using Modules Anywhere plugin and when I ran it through the validator, I got this error message
# Error Line 949, Column 82: ID "phocagallery-module-ri" already defined

…> Modules Anywhere >>> --><div id ="phocagallery-module-ri" style="text-align



An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).
I looked for where I could give each a unique div id but do not see how. Is there an easy solution for this? I guess I could live with it, since it does work, but I would like this site to pass validations.

Any thoughts?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Invalid Markup with multiple instances of random image mod

Post by Jan »

Hi, I will take a look at it, I think, the id is need for some javascript so there can be problem with more instances for validator but not for the site.

Jan
If you find Phoca extensions useful, please support the project
OrionKC
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 02 Nov 2009, 06:57

Re: Invalid Markup with multiple instances of random image mod

Post by OrionKC »

Jan,

Thanks for the response. I appreciate the great component and your work.

Yeah, I figured I would have to remove the other two instances or just accept the validation error for now anyway. I'm trying to figure out why exactly it is considered an error as it does appear to work properly in Firefox, IE and Safari.

My research on this topic has yielded me responses which are the equivalent of "It's an error by definition, and that's all you need to know pal!"
Post Reply