I have a few Boxes with basic text content. When I edit a Box (under admin/build/blocks) none of my changes are saved. Does not seem to be a caching issue as the content inside the text field remains unchanged when I go back and edit the same Box again. What gives?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jmiccolis’s picture

Status: Active » Fixed

This should be fixed in the latest release. Please re-open this if you can still reproduce it with beta2.

snufkin’s picture

Version: 6.x-1.0-beta1 » 6.x-1.0-beta3
Status: Fixed » Active

I am having issues with this, latest beta. I used features to export my boxes. When i re-create the site my boxes although have the content in them, are not editable, because they weren't added to the database, and boxes_save tries a drupal_write_record updating according to the box delta.

There is a reference to a hook_default_boxes in the feature file, but i cant see where this would be called from.

yhahn’s picture

I believe this commit should fix the issue: http://drupal.org/cvs?commit=337682. Let me know if it works.

snufkin’s picture

Status: Active » Fixed

Yes it works, thanks!

rootdownmedia’s picture

Im sorry all, I am not CVS literate and unfort need to fix my prod site quickly. Is there an alternate way of downloading the updated module?

rootdownmedia’s picture

Duh. (To the CVS illiterate users out there) you can download the latest boxes.module file by clicking on "Download" here:
Log of /contributions/modules/boxes/boxes.module

Problem fixed. Thanks yhahn and all!

Status: Fixed » Closed (fixed)

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

michaellander’s picture

Version: 6.x-1.0-beta3 » 6.x-1.0-beta4
Status: Closed (fixed) » Active

I reopened this issue, though it has to do with the WYSIWYG API and CKEditor 3.2.

Similar to this post: http://drupal.org/node/728196

Whenever I try to do the inline editing with boxes the CKEditor is pretty hit or miss on if it loads or not. Then if I for say, split one large paragraph into two separate paragraphs, and click save, the changes are not reflected in the box. However, if I make the above change, then disable and re-enable the editor, the changes then save correctly.

I'm not entirely certain this is an issue with the boxes module, so if not I apologize.

Thanks!

michaellander’s picture

Upon further testing, I've found that it will always load CKEditor the first time you load the page and click the inline 'edit' link. However, after saving the box and then clicking 'edit' again, the editor will no longer load.

jmiccolis’s picture

Title: Can't edit Boxes » WYSIWYG issue with Boxes

Title change.

justadropofwater’s picture

I've been able to reproduce this with CKEditor (6.x-1.1) and WYSIWYG (6.x-2.1) with the TinyMCE library (3.3.5.1) with Boxes Alpha 2 (the version that comes with OA Beta 6) as well as the latest and greatest (along with the latest Spaces, Context, CTools, etc).

Boxes do not save after the initial creation (Click on Add Custom Box, Edit, Save). I am still am unsure if this is specifically a Boxes issue, see http://drupal.org/node/741572 (which a patch was posted, this didn't work in either of my test cases) and http://drupal.org/node/785356.

Here's some other interesting behavior I've noticed:
When using CKEditor, it will reappear after click on the "Enable/Disable Rich Text Editing" button TWICE after disappearing.

When using TinyMCE, I can disable Rich Text Editing and editing will stick. I can then save and keep my changes.

I'm going to dig a little more into this over the weekend. This issue completely cripples the use/power of Boxes.

wik’s picture

subscribing

fallsemo’s picture

+1

I can reproduce this using the Boxes 6.x-1.0-beta9, WYSIWYG 6.x-2.1, and CKEditor 3.3.0.5542

andyhu’s picture

Version: 6.x-1.0 » 6.x-1.0-beta10
Status: Needs review » Active

I also experienced with this issue.
Drupal模块

andyhu’s picture

Version: 6.x-1.0-beta4 » 6.x-1.0-beta10

Hi guys,

I spent couple of hours in this issue and found the solution. Just install this module http://drupal.org/project/wysiwygcck and it's dependency modules. And this is it, we are done! If you have any questions please click here http://drupal.org/user/172337/contact to drop me a message

Hope it helps.

Cheers,
Andy

Collabforge.com

patricksettle’s picture

Version: 6.x-1.0-beta10 » 6.x-1.0-beta11

Bug still active with 6.x-1.0-beta10 and 1.0-beta11, wysiwyg-6.x-2.1 and 2.x-dev. Attempted using wysiwygcck as outlined by #15 but bug continued.

andyhu’s picture

Hi hyrcan,

Have you installed all its dependency modules? I have tested and the issue is sure fixed on my site when I enable wysiwygcck.

Cheers,
Andy

patricksettle’s picture

Andy, yes attempted with wysiwygcck and it's dependencies. ~hyrcan

bforchhammer’s picture

Subscribing.
I'm having the same issues as described above; the wysiwygcck solution does not work for me either.

deverman’s picture

subscribing we seem to be having the issue where the boxes we have are missing the TinyMCE editor all together when I click the Edit link on a panels page containing boxes.

mrtorrent’s picture

subscribing

quiron’s picture

subscribing

the wysiwyg libraries are not included on dashboard page.

mrfelton’s picture

The WYSIWYG displays fine for me, but when I save the box, all the content is lost.

quiron’s picture

Hi,

I have it partialy working. With the CKEdior version 3.3.2 apears in the box editing textarea, but when save it doesn't save.

To solve the save isue I added the following snippet in all/modules/wyiswyg/editors/js/ckeditor-3.0.js at line 80:

   $('.form-submit.boxes-ajax').mouseover(function() {
       for (var i in CKEDITOR.instances)
          CKEDITOR.instances[i].updateElement();
     });

And I can save the boxes.

But it apears some new issues. When add a custom box the editor doesn't apear, I need save the box and then edit it. Looking up on firebug the diference is that the call to wygiwys are not done.
Also, when editing a box, save it and edit again (without a page refresh) the wyswyg doesn't apear and the textarea is bloked. the javascript console rise the follow error:

uncaught exception: [CKEDITOR.editor] The instance "edit-body" already exists.

I hope this testing helps the development!

thanks!

quiron’s picture

Hi,

the response talking about it in the wysiwyg issue tracker, maybe it can help here.

http://drupal.org/node/947490

pixelsweatshop’s picture

getting the same thing :)

tylor’s picture

Version: 6.x-1.0-beta11 » 6.x-1.0
FileSize
746 bytes

You can get rid of the editor and avoid the error by using destroy() or detach(), as mentioned in #947490: On save does not doestry the editor instance from #24. Here's a hacky patch for WYSIWYG if you would like to add this to a makefile.

tylor’s picture

More hacky quick fixes, add setTimeout() during attach so that the textarea has time to load in Chrome and Safari.

borgewarvik’s picture

+1

vegardjo’s picture

Subscribe - experiencing this with Boxes 6.x.1-0, Wysiwyg 6.x.2-2 and CK 3.4.2.604, installing the modules in #15 didn't work either.

kyle_mathews’s picture

#28 solved this problem for Boxes 1.0, WYSIWYG 2.1, and CKEditor 3.51. Thanks tylor.

Grayside’s picture

Subscribe. Hacks with timing? hm.

mstef’s picture

subscribing..

no luck with #28

mrfelton’s picture

I get this problem on Drupal 7 too. Boxes 7.x-1.0-beta3, WYSIWYG master.

lyd’s picture

Same problem.
Using clean Open Atrium 1.0 install with latest ckeditor. The editor does not show up in custom box in dashboard.
Am not experienced enough to apply #28. Can someone help?

btopro’s picture

+1 sub D6 CKeditor

tomasbarej’s picture

Status: Active » Patch (to be ported)
FileSize
786 bytes

I added a code to boxes.js file, that handles with wysiwyg.module. If box edit form contains enabled wysiwyg instance, after submitting form it will by detached using wysiwyg API before sending the updated form values using ajax. I used it on latest Open Atrium, and it fixes issue with editting box on dashboard.

Here's the attached patch.

gmclelland’s picture

Is this also an issue when using D7?

Shiraz Dindar’s picture

D6, #37 worked for me, #28 did not.

smithmilner’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.36 KB

My attempt to port this for D7 dev. I created a boxes submit event that detaches the wysiwyg from the form before saving. I originally had it fire when the box save button was clicked but it was too late in the game and wouldn't work, so I used mousedown for now. I don't think this is best case but lets play with it.

katbailey’s picture

Here's a version that does the wysiwyg detaching magic in the detach function of Drupal.behaviors.boxes. This means it will be called when Drupal.detachBehaviors() is called, which actually happens during beforeSerialize() of the ajax form submission - which is the perfect time for wysiwyg editors to do their thing.

I don't like the fact that it means boxes' js has to do something wysiwyg-specific - I'm not sure why wysiwyg itself doesn't do this.

EDIT: this is for D7!

e2thex’s picture

Is there an issue for this in wysiwyg module? I would much rather fix it there then commit something to boxes for fixing this, if we really think this is a wysiwyg problem and not a box one.

tanc’s picture

Version: 6.x-1.0-beta10 » 6.x-1.0
Status: Active » Needs review

Thanks katbailey, confirmed #41 worked for me. But agree that if this is wysiwyg specific then it should be fixed there.

amstel’s picture

#37 worked for me as well. Using D6, Open Atrium, Wysiwig 2.4.

fuzzy76’s picture

#37 worked like a charm! D6, Wysiwyg, custom context/spaces/features stack. :)

fuzzy76’s picture

Status: Needs review » Reviewed & tested by the community
brandenlhamilton’s picture

The Boxes module uses AJAX to submit the form in the background.
Wysiwyg module is unable to detect and respond to this because there's no global event to listen for in the version of jQuery.forms used by D6. Wysiwyg would need such an event to know when to detach any active editors - which would properly sync content back to the original textarea and remove the editor instance.
--Posted by TwoD

Taking note from the comment referenced above, I've prepared a patch against the 6.x-1.x branch that incorporates the patch provided in #37 (as it seems to be working for several individuals) and a modified implementation of #24, however re-worked to provide the standalone CKEditor module compatibility. Theoretically this should enable both the Wysiwyg and CKEditor modules to work with Boxes.

brandenlhamilton’s picture

Found a small bug with the patch I posted in #47. The CKEditor implementation was not properly scoped and could cause a 'ReferenceErrors (“x is not defined”)' error that prevented Boxes from posting the form via AJAX, and instead throwing the JSON response onto the screen.

djdevin’s picture

So editing existing boxes works fine for us with spaces_dashboard. But...

On initial box creation, when there are no other boxes on the dashboard, the wysiwyg does not load.

When you save the box as plaintext, and edit, the wysiwyg appears, and works.

Anyone else have this issue? I've tried on a clean D6, debugged with browser tools and figured out that the "edit" button has ctools behaviors attached to it, which makes it work.

But dragging it from from the admin menu to a region, no wysiwyg.

Edit: I think the issue is with Spaces, it's not pulling in javascript when added with drupal_add_js (like ctools would do).

simon.fryer’s picture

I have the same problems as above, still, this amount of time on.

All of the patches above made no difference.

When editing any node with Boxes, Spaces and WYSIWYG i get NO editor when i ADD a new custom box.

If you save the box with nothing filled in, it will error, and the editor will appear.

Beyond this, it only saves the contents of the box if you switch the editor mid way through and then hit save.

Does anyone have a definitive fix? Hell, if you can assure me you can fix the above issues, we can discuss a freelance role to get this fixed for the client.

Answers on a postcard, i'm at a dead end.

hefox’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Issue summary: View changes
Status: Reviewed & tested by the community » Needs work

Sounds like needs work based on ^

joseph.olstad’s picture

Status: Needs work » Closed (outdated)

6.x no longer supported, please upgrade to 7.x