When I turn on fieldset helper the ckeditor is gone and no more available.

How can I set the prefs not to conflict ?

CommentFileSizeAuthor
#6 term-edit-error-collapseJS.jpg214.76 KBpverrier

Comments

jrockowitz’s picture

My guess is javascript is not initializing widgets that are hidden within a collapsed fieldset.

I have seen a similar issue with table dragging. http://drupal.org/node/303189

Is the ckeditor gone only when the fieldset is collapsed?

Are you using the ckeditor or the wysiwyg module?

drupa11y’s picture

The wysiwyg module.

The editor does not show. I can select the different modes (full html etc.) but no change.

Also guess this a js-thing.

jrockowitz’s picture

Status: Active » Needs review

Jquery was throwing this js error. "Causing "uncaught exception: Syntax error, unrecognized expression:", which stopped the Wysiwyg module from executing.

Removing the .after(' '); from Line 83 in misc/collapse.js fixed the issue. Honestly I am not sure why this line on code is needed. The code just inserts a single space to all the selected elements.

Instead of telling everyone to hack core I just copied over the 'Drupal.behaviors.collapse' function into my module's fieldset_helper.js and made the required tweak.

I am hesitant to open up an issue against Drupal 7 core since I don't fully understand why removing one line of js code solved the problem. I am also curious to see if there any repercussions to my tweak.

For tracking purposes this is the Drupal 7 ticket and CVS commit that introduced the change to collapse.js

- #541568: Link to expand / collapse fieldsets has poorly accessible link text

- This is exactly when the .after(' ') code was introduced to collapse.js. http://drupal.org/node/541568#comment-2237264

- http://drupalcode.org/viewvc/drupal/drupal/misc/collapse.js?revision=1.2...

This issue is fixed and you should update to most recent fieldset_helper 7.x-2.x-dev release.
For now I don't want to close out this issue since this current solution is not exactly perfect.

jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pverrier’s picture

StatusFileSize
new214.76 KB

I'm not using this module but I'm very happy to finally have found the source of my problems...

I've a JS error on the term edit page (Seven is my admin theme), and the (wysiwyg) CKeditors and the hierarchy section disappeared, on Chrome, Firefox or Safari.

I installed the jquery_update module hoping this would change something, in vain. I left this module and therefore am using jQuery 1.5.2.

On the Chrome debugguer I found that the exception "Syntax error, unrecognized expression: " (+ a space) was caused by misc/collapse.js Line 82 :

      $('<span class="fieldset-legend-prefix element-invisible"></span>')
        .append($fieldset.hasClass('collapsed') ? Drupal.t('Show') : Drupal.t('Hide'))
        .prependTo($legend)
        .after(' ');

So it's exactly the same issue here.

I removed the ".after(' ');" line but, if happily my CKeditors are back, the hierarchy section ("Relations") is still unavailable (but curiously I've the path alias fieldset that works).

So it seems this should be fixed in core. Also reporting in http://drupal.org/node/541568.

pverrier’s picture