I am experiencing some weird css-id issues when creating 'to do' content.

There appears to be an extra variable assigned to all CSS id's on the create to do page.
My first notice was that the FCKEditor wasn't working on the 'Description' area, even though it should have. Next I noticed that the body element is ID'd as edit-body-1 rather than the normal edit-body (notice the extra dash+1 at the end). Further exploration revealed that all id tags assigned by Drupal, based on element names and such things have got that extra dash+1, either at the end or within their ID tags.

On a normal 'create content type' page I have elements like (this example is from a 'create a book page'):

<div class="node-form">
  <div class="standard">
<div class="form-item" id="edit-title-wrapper">
...
 <input type="text" maxlength="255" name="title" id="edit-title" size="60" value="" class="form-text required" />
...
<fieldset class="menu-item-form collapsible collapsed"><legend>Menu settings</legend><div class="form-item" id="edit-menu-link-title-wrapper">
...
</div><div class="form-item" id="edit-body-wrapper">

 <label for="edit-body">Body: </label>
 <textarea cols="60" rows="20" name="body" id="edit-body"  class="form-textarea"></textarea>

on the 'create to do' page the same lines of html look like this:

<div class="node-form">
  <div class="standard">
<div class="form-item" id="edit-title-1-wrapper">
...
 <input type="text" maxlength="128" name="title" id="edit-title-1" size="60" value="" class="form-text required" />
...
<fieldset class="menu-item-form collapsible collapsed"><legend>Menu settings</legend><div class="form-item" id="edit-menu-link-title-1-wrapper">
...
</div><div class="form-item" id="edit-body-1-wrapper">
 <label for="edit-body-1">Description: </label>
 <textarea cols="60" rows="20" name="body" id="edit-body-1"  class="form-textarea"></textarea>

What's even weirder is that on preview everything returns back to normal. The node is created and displays properly (with rich text items in place and all), but press edit and the problem is revealed again (preview again and it disappears again).

I have tested to ensure that this only happens on the 'to do' content page - all other content types work as a charm as they always have done. Rich text editing of the things I'm creating as 'to do's' is vital for my project and thus a 'must have' for me, even though others might easily be able to use the module on their projects. I'm not certain that people will feel comfortable to start by hitting the preview button before even starting to write the description, resulting in this module being close to un-usable (for my project anyways).

I do not have the module-creation skills to figure this one out on my own although a standard search through the todo.module did not reveal any oddly situated '-1's'

Hopefully this is something simple to fix, as the module appears to be exactly what I was looking for.

Tanks.
/elfur

Comments

jaypan’s picture

Sorry about my slow response on this.

I have tried to recreate the problem, but I cannot figure out how to replicate it. I don't have these -1s being appended to my form IDs.

But your FCK editor should still be able to work even with the -1s appended - just make sure that you either add the IDs with the appended -1s to your white list, or make sure they aren't in your blacklist.

jaypan’s picture

Status: Active » Postponed (maintainer needs more info)
AlexisWilke’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

This is either a "problem" with the template engine which goes through your HTML and ensure that each ID is unique or the CCK fields include a number that is larger than 1 or marked as "unlimited".

Anyway, this was a long time ago, and I will assume that I can just close this issue. If not, feel free to shout!

Thank you.
Alexis Wilke