I edited a node body and used Node Picker to select a link. After saving the node, the link displays properly. However, when editing the node again, the HTML contents briefly display, but then when the TinyMCE toolbar appears, the entire contents of the body are removed. Clicking the HTML button in TinyMCE shows no content. If the node is saved, there is no content.

If I go into my WYSIWYG profile and disable the Node Picker button, then the content is retained and it shows the [nodepicker...] tag within the body. So it's definitely the Node Picker TinyMCE plugin that is causing the body content to be cleared. Can't use this module until this is fixed.

Comments

peter törnstrand’s picture

Assigned: Unassigned » peter törnstrand
peter törnstrand’s picture

Please post steps to reproduce containing information about core and module versions.

peter törnstrand’s picture

Status: Active » Postponed (maintainer needs more info)
peter törnstrand’s picture

Where you inserting a link containing an ampersand character? If so, this is fixed.

scip’s picture

I'm getting this too.
It works the first time, but when you edit again, TinyMCE is removing the text when it contains [nodepicker....] elements.
I can see this happening if I switch between disable/enable WYSIWYG
Using D6.14
Node picker version 6.x-1.0-alpha2
with WYSIWYG 6.x-2.x-dev

peter törnstrand’s picture

Version: 6.x-1.x-dev » 6.x-1.0-alpha2

Ok. What other modules are you using? Does this occur on a fresh install of Drupal with only required modules installed?

scip’s picture

Err....I'm using lots of modules - you don't really want a list of them all here do you?
I have a feeling that I would need to let TinyMCE ignore the [nodepicker..] text, but I'm not sure how to do this. It works if the text is something else such as [internal:...]

peter törnstrand’s picture

Can you try the latest DEV snapshot and see if the problem still exists?

scip’s picture

Sorry, still having the problem.
I'll try to install on a fresh Drupal install and see what happens

scip’s picture

Right, I've tried this on a vanilla 6.14 install and I'm getting the same results.
I've got:
Tinymce 3.3.2 (although was not working on 3.2.5 either)
Wysiwyg 6.x-2.x-dev
node_picker 6.x-1.x-dev
jQuery UI 6.x-1.3 and
Views 6.x-2.10

peter törnstrand’s picture

Ok, I will have a look at this as soon as possible. Thank you for your work on recreating this error.

peter törnstrand’s picture

Ok, I have tried this myself now with the following setup:

Drupal 6.16
Nodepicker 6.x-1.0-alpha2
jQuery UI 6.x-1.3
Wysiwyg 6.x-2.1 with TinyMCE 3.3.2
Views 6.x-2.10

Everything works fine. Are you sure you are using the 1.6 version of the jQuery UI JavaScript Library downloaded from the location mentioned in the jQuery UI module installation instructions?

If you are using any other version of the library it probably will not work as the newer versions are not compatible with the version of jQuery that ships with Drupal as standard.

scip’s picture

I was running jquery update and therefore the 1.7 version.
I've now got jQuery UI 1.6 and jQuery Update 1.2.6
I've moved to WYSIWYG 6.x-2.1 to match you - and I'm STILL getting the problem.

I can't help thinking this is a WYSIWYG/TinyMCE issue as Node Picker is putting the right text in the editor (e.g. when I disable rich text editor I can see the text <p>[nodepicker==node/3==Make%20my%20day==Make%20my%20day]</p>)
When I enable it again, the link text disappears (although it is still there when I switch the RTE back on again)

Thanks for your support - happy to give you access to the site if this helps

peter törnstrand’s picture

Ok, since we have ruled out (for now) that this is module compability related maybe we should move on to browsers. What browsers have you tried? Does the problem exist in every browser?

scip’s picture

I've tried IE7 and 8, and FF3.

In Firebug, I'm getting an error:
response is null
http://mydomain.org/..../modules/nodepicker/plugins/nodepicker/nodepicke...
Line 86
So I checked and this is throwing an error as there's no json_encode function. I'm running php5.1 so I think you have a requirement for 5.2
I've used the work around here: http://drupal.org/node/392978 and everything is now working.

mpotter’s picture

Finally had time to come back to this issue myself. I'm really glad scip posted his details because I am *also* using PHP 5.1. I will try the above fix and see if it works.

peter törnstrand’s picture

Status: Postponed (maintainer needs more info) » Fixed

I'm marking this as fixed as it seems a solution as been provided.

mpotter’s picture

Please make it clear in the Project page (Requirements section) that PHP 5.2 is required so that other people don't run into this problem.

peter törnstrand’s picture

For versions below 5.2 there is a substitute function that should make it work even if you are running an older version of PHP.

mpotter’s picture

Are you talking about the link posted in #15, or have you added something to the Node Picker module to handle this? If you are talking about #15, then you still need to make this requirement clear in your Project page. Otherwise people trying to use your module will have no clue that they either need PHP 5.2+ or that they need to install the substitute functions.

If you have added these substitute functions to Node Picker itself to solve this issue, then all is good.

peter törnstrand’s picture

Yes, the function has been added to the Node Picker code.

Status: Fixed » Closed (fixed)

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