|
|
Forum-Information
Before posting about errors, make sure that the answer cannot already be found
in our FAQ or by searching this forum!
Posting is restricted to registered users ( registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.
|
Found a bug? Tell us!!
-

seraphyn
- Regular
-
- Posts: 211
- Joined: Fri Dec 01, 2006 9:42 am
-
by seraphyn » Mon Jun 06, 2011 9:02 am
Hi, I don't know if it's a bug or an PEBKAC. I'm using to HTML-Nuggets for selfwritten text in my sidebar at the bottom and the Validator gives me an: Line 910, Column 14: ID "serendipity_html_nugget_plugin" already defined <div id="serendipity_html_nugget_plugin" class="sbitem">
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). Line 900, Column 14: ID "serendipity_html_nugget_plugin" first defined here <div id="serendipity_html_nugget_plugin" class="sbitem">
One is for Textinformation and one for links. If it's not my fault could it be possible to generate one more class with the title shortened for the item? Thx in advance chris
-

garvinhicking
- Core Developer
-
- Posts: 28944
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
-
Re: Using two HTMl-Nuggets makes page invalid
by garvinhicking » Mon Jun 06, 2011 11:52 am
Hi!
Which template are you using? This is happening because in the sidebar.tpl file of your template a ID is given, probably to support specific styling of special plugin outputs. Since the nugget plugin can be used multiple times, that causes a problem.
It would be better to apply the unique styling through a div.class instead of div.id...
Regards, Garvin
-

seraphyn
- Regular
-
- Posts: 211
- Joined: Fri Dec 01, 2006 9:42 am
-
Re: Using two HTMl-Nuggets makes page invalid
by seraphyn » Mon Jun 06, 2011 1:54 pm
ahhh, I'll have a look. Selfwritten Template. In this case PEBKAC...  Thx
-

seraphyn
- Regular
-
- Posts: 211
- Joined: Fri Dec 01, 2006 9:42 am
-
Re: Using two HTMl-Nuggets makes page invalid
by seraphyn » Mon Jun 06, 2011 2:04 pm
- Code: Select all
#sidebar_top .sbitem { float:left; width: 48%; margin: 5px; }
Using this code and more not. does this one provides the error?
-

yellowled
- Regular
-
- Posts: 4880
- Joined: Fri Jan 13, 2006 12:46 pm
- Location: Eutin, Germany
-
Re: Using two HTMl-Nuggets makes page invalid
by yellowled » Mon Jun 06, 2011 3:29 pm
garvinhicking wrote:It would be better to apply the unique styling through a div.class instead of div.id...
Another possibility is to assign unique ids to HTML nuggets in the sidebar.tpl using a smarty counter, but that's usually only desirable if various nuggets need individual styling. Also note that multiple instances of the same id are invalid HTML, so Garvin's class suggestion is really the better idea. YL
-

seraphyn
- Regular
-
- Posts: 211
- Joined: Fri Dec 01, 2006 9:42 am
-
Re: Using two HTMl-Nuggets makes page invalid
by seraphyn » Mon Jun 06, 2011 3:33 pm
But the ID is from placing the plugin in the administratorpage? Isn't it? greetings chris
-

yellowled
- Regular
-
- Posts: 4880
- Joined: Fri Jan 13, 2006 12:46 pm
- Location: Eutin, Germany
-
Re: Using two HTMl-Nuggets makes page invalid
by yellowled » Mon Jun 06, 2011 4:22 pm
seraphyn wrote:But the ID is from placing the plugin in the administratorpage?
No. If this - Code: Select all
<div id="serendipity_html_nugget_plugin" class="sbitem">
is the result, it's very likely your sidebar.tpl has something like this in it: - Code: Select all
<div id="{$item.class}" class="sbitem">
That's fine as long as you don't have any plugins in the sidebar which allow multiple instances like the HTML nugget plugin. I used to use similar code in my blog, but I didn't use HTML nuggets. As the name of the variable indicates, $item.class is supposed to be assigned as a class, not an id. YL
-

seraphyn
- Regular
-
- Posts: 211
- Joined: Fri Dec 01, 2006 9:42 am
-
Re: Using two HTMl-Nuggets makes page invalid
by seraphyn » Mon Jun 06, 2011 6:32 pm
Ahhhh, Okay. So I need to change this... Thanks
-

seraphyn
- Regular
-
- Posts: 211
- Joined: Fri Dec 01, 2006 9:42 am
-
Re: Using two HTMl-Nuggets makes page invalid
by seraphyn » Mon Jun 06, 2011 7:21 pm
Works  Thanks, hope that I finish this theme until the next 2 months. Greetings Chris
-

yellowled
- Regular
-
- Posts: 4880
- Joined: Fri Jan 13, 2006 12:46 pm
- Location: Eutin, Germany
-
Re: Using two HTMl-Nuggets makes page invalid
by yellowled » Mon Jun 06, 2011 8:44 pm
seraphyn wrote:Thanks, hope that I finish this theme until the next 2 months.
Don't forget to show it off in the Showcase or Themes (if you make a public release) forum.  YL
-

seraphyn
- Regular
-
- Posts: 211
- Joined: Fri Dec 01, 2006 9:42 am
-
Re: Using two HTMl-Nuggets makes page invalid
by seraphyn » Mon Jun 06, 2011 8:50 pm
Should be a public release. But that what would like to do ain't to be easy, but I'm a perfectionist lol. At the moment I'm fighting with the CSS3 floats etc... but I see a light at the end of the tunnel and this ain't to be a train... hope so lol
Return to Bugs
Who is online
Users browsing this forum: No registered users and 1 guest
|