By Danièle Charpenay on Wednesday, 30 December 2015
Posted in Technical Issues
Likes 0
Views 458
Votes 0
Hi there,
Joomla v3.4.8, EasyBlog v5.0.31
got following errors on our live site, see the link in site access part, through https://validator.w3.org

Warning: The first occurrence of ID fd was here.
From line 20, column 2617; to line 20, column 2697
t-content><div id=fd class="eb eb-vintage eb-view-latest eb-layout-default eb-responsive"><div c

Error: Duplicate ID fd.
From line 31, column 2496; to line 31, column 2586
e-content><div id=fd class="eb eb-mod mod_easyblogmostpopularpost ct-module-theme2 visible-desktop"><div c

Error: Duplicate ID fd.
From line 37, column 1107; to line 37, column 1208
e-content><div id=fd class="eb eb-mod st-1 eb-responsive mod-easyblogshowcase ct-module-theme2 visible-desktop"><div c

Normally we should get only one occurrence of the same ID.

We've found that the same one is defined in :
modules/mod_easyblogmostpopularpost/tmpl/default.php
modules/mod_easyblogshowcase/tmpl/default.php

How can we fix it ?

Cheers,
Lionel
Hey Lionel,

Yes, it is unfortunately Some template providers are doing this in their css,


#template-provider ul * {
background: #000;
}


The code above is just a sample but I guess it gives you the idea as to why we are enforcing an "id". If we have the following code, it will not work:


<div id="template-wrapper">
<div class="eb">
<ul class="eb-list">
<li>
hello</li>
<li>
</li><li>
world
</li>
</ul>
</div>
</div>

// This will not work because the template uses #template-wrapper to style their elements.
div.eb .eb-list * {
background: none;
}


However, if we have prefixed the wrapper with an id, it will work



<div id="template-wrapper">
<div class="eb">
<ul class="eb-list">
<li>
hello</li>
<li>
</li><li>
world
</li>
</ul>
</div>
</div>

// This would work because it's more specific as we have an "id" with a class.
div#fd.eb .eb-list * {
background: none;
}
·
Thursday, 31 December 2015 00:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Daniele,

This is actually necessary as we need to overcome 3rd party template conflicts by prefixing each wrapper with an id. There is no way to actually override without using an id because id has higher precedence.
·
Wednesday, 30 December 2015 21:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,
I understand, but is it mandatory to use the same id in modules/mod_easyblogmostpopularpost/tmpl/default.php
and modules/mod_easyblogshowcase/tmpl/default.php ?

Cheers,
Lionel
·
Thursday, 31 December 2015 00:25
·
0 Likes
·
0 Votes
·
0 Comments
·
thank you for your lights.
Cheers,
Lionel
·
Monday, 04 January 2016 20:42
·
0 Likes
·
0 Votes
·
0 Comments
·
No problem Lionel, and thank you for understanding We really wouldn't want to go with this route but some template clubs are ludicrous and we have to sort this out ourselves.
·
Monday, 04 January 2016 21:26
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post