EditableField for single checkbox (text) CCK field throws JS error on page load, field not editable

tmallen - February 15, 2009 - 23:02
Project:editablefields
Version:6.x-1.1
Component:User interface
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

I get the JS error,

"An error occurred at ?q=/editablefields_html/33/field_completed"

In OSX 10.5 Firefox 3. I get a similar bug in Safari (a path to the edit data is reported as "Cancelled"): This resource fails to load: //editablefields_html/33/field_completed. I am fairly certain that this is due to the doubled slashes which may cause the browser to look to http://editablefields_html/33/field_completed. I resolved bugs on my site related to this and Secure Pages (where root paths cannot end with a slash, or else you can get locked out of the admin) earlier today. Does part of this module add more than one slash to the beginning of a path?

This is for a single on/off checkbox that displays with the label on node view, set to "editable" display. The checkbox does not appear, hence the data for the field is missing as well.

Please let me know if there's any other information I can offer that will help to find the source of this bug.

#1

markfoodyburton - March 4, 2009 - 08:12

I think the new dev version fixes this, can you check?

#2

tmallen - March 6, 2009 - 01:52

I don't know quite yet, but you did include a function that crashes any page loading an editable field. I'd make a patch if I could.

In editablefields.module:84:
  if (!node_access('update',$node) || !content_access('edit', $field)) {
Replace with:
  if (!node_access('update',$node) || !node_access('edit', $field)) {

Edit: I don't see the checkbox widget anymore. I set a CCK field as Int+Single on/off and another as text+on/off, each with two possible values, and each with display set to "Editable." The property works fine when editing the node, but the editable region never appears in node view.

#3

markfoodyburton - March 6, 2009 - 08:44

youneed the latest version of cck

Cheers

Mark.

#4

tmallen - March 8, 2009 - 03:28

I'm running the latest CCK, unless you're implying that I should be on the dev branch.

#5

markfoodyburton - March 9, 2009 - 08:34

yeah, sorry, the cck dev branch is what has the new content_access code in it

#6

tmallen - March 10, 2009 - 02:28

Oh. I can afford to run a dev version of a smaller module like this one on my website, but probably not CCK, unfortunately. I could throw both on a test site, but you guys already know if that will work. Wish I could help more...I'll take another look when a stable CCK release has content_access().

Thomas

#7

usa2k - March 10, 2009 - 03:39

I do not get an error, but I cannot make the CCK field unchecked.

Tested with FF3 on MEPIS 8, and xampp
Tested with FF3 on Vista using Wampserver

Going into node edit mode can change the single checkbox.

#8

tmallen - March 10, 2009 - 22:34

You'll only see the errors if you're using the Web Developer or Firebug add-ons.

 
 

Drupal is a registered trademark of Dries Buytaert.