Hi everyone,

This module is exactly what I'm looking for! I can't seem to get it to work though. I did everything (I think) in the install.txt. I had to download the .zip file that was posted in #540540: Missing files for installation to get the theme and linkpicker directories.

I can see the Drupal Link Picker when going to edit > buttons & plugins in my profile. When I check the checkbox for Drupal Link Picker, TinyMCE disappears when editing a node. If I uncheck Drupal Link Picker TinyMCE appears and is working fine.

Has anyone else had this happen?

-Tim

Comments

tronathan’s picture

Please try downloading the latest version of this module from the CVS at

http://drupal.org/project/tinymce_node_picker

The development snapshot release has been removed from the project page. It will be added when the release can be repackaged to contain the missing resources.

TimG1’s picture

Hi tron,

I'll be happy to give the CVS a try. I'm not sure how to do that though...can you give me a hint? =)

-Tim

ShutterFreak’s picture

Category: support » bug
Priority: Normal » Critical
Issue tags: +MSIE, +MSIE6

Updating this issue from support request to a critical bug as this module does not work on Microsoft Internet Explorer.

This bug apparently only affects Microsoft Internet Explorer (MSIE). So far I tested with MSIE6 (can't test with newer browser, sorry). MSIE complains about JavaScript errors as reported by the warning icon at the bottom left of the screen. The error messages read:

Line: 2
Char: 84105
Error: Could not complete the operation due to error 80020101.
Code: 0

Line: 24
Char: 5
Error: Expected identifier, string or number
Code: 0

Looking for "error 80020101" on the Internet learns me that apparently MSIE could not compile the JavaScript. Some causes mentioned are: unescaped or entire HTML tags in replies (try cutting them in 2 like in '<foo' . '/>'), Unicode encoding of the script file. The problem is that I can't see any of those in the JavaScript files of the TinyMCE module.

The plugin works perfectly in FireFox.

tronathan’s picture

Version: 6.x-1.x-dev » 6.x-1.2
Priority: Critical » Normal
Status: Active » Needs review

The "Tinymce disappears" issue is different than the "does not work in internet explorer" issue. The internet explorer issue has been bugged separately here:

http://drupal.org/node/580962

Version 6.x-1.2 has been released at

http://drupal.org/node/580956

which contains all missing files and may correct the problem. Note that the installation instructions are extensive. Also note that this release 1.2 has not been tested in a clean install environment. Please make sure you followed the documentation and install the 1.2 version. If the issue persists I'll attempt a repro.

tronathan’s picture

Assigned: Unassigned » tronathan
kentr’s picture

This is occurring for me as well.

I've tested in FF-Mac 3.5.3 and Safari-Mac 4.0.3.

Here's what the end of tinymce.inc looks like (minus the <? ?> tags):

    $plugins['safari'] = array(
      'path' => $editor['library path'] . '/plugins/safari',
      'extensions' => array('safari' => t('Safari compatibility')),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari',
      'internal' => TRUE,
      'load' => TRUE,
    );
   $plugins['linkpicker'] = array(
      'path' => $editor['library path'] .'/plugins/linkpicker',
      'buttons' => array('linkpicker' => t('Drupal Link Picker')),
      'url' => 'http://drupal.org/node/534856',
      'internal' => TRUE,
      'load' => TRUE,
    );
  }   
  return $plugins;

I believe I have followed the installation instructions correctly, but I have some confusion about these lines:

Edit the file plugin_reg.php in the tinymce directory. It's located in:

[sites/all/]/modules/wysiwyg/editors/tinymce.inc

I don't find the file plugin_reg.php anywhere, and this path [sites/all/]/modules/wysiwyg/editors/tinymce.inc is a file, not a directory (so the file plugin_reg.php cannot be in there like the INSTALL instructions say).

I've also tried removing the comma described in #580962. No difference.

Mote’s picture

Hi,

First, sorry about my english... i'm a french speaker ;-)

I have exactly the same problem :( but I follow the installation guide with some difficulties... may be it's the reason of my problem

a little description of my system, maybe it can help. I work with drupal 6 on a fedora 11 with apache2, mysql5 and php5 and my browser is firefox 3.5 and i have few modules installed (i18n, taxonomy block, pathauto, global redirect, embedded media field, lightbox2, IMCE, backup and migrate, taxonomy manager, webform, CCK, view, translation404, taxonomy vtn, wysiwyg, wysiwyg api imce, xml sitemap etc...)

Firstly, my drupal installation isn't in the root folder (/) but in /drupal/... and there aren't explanation in lines 31 to 35 of editor_plugin.js as tell on the install file... I dont know really what to do at this step. Secondly, the file plugin_reg is only on tinyMCE module, not in the wysiwyg API module with tinyMCE in libraries folder but the content it's very similar to tinymce.inc file. So I paste the plugins bloc there just after the safari plugin, it must be ok. Next, I haven't a personal themes folder ... so i copy the templates in every theme folder of my drupal installation to be sure to find the good one. Installation finish, then I activate the plugin Drupal Link Picker... but at the end i have no more tinyMCE wysiwyg interface :( I disable the plugin and the wysiwyg interface is back...

I think the problem come from one of the step where i have some difficulties... and very probably at first step (root folder)...

I try to patch my linkpicker with some cvs update, but no chance, it's always the same trouble :(

BR

Mote

freddyseubert’s picture

Same here.

Line 35 of file "linkpicker/editor_plugin.js" is "ed.addButton('linkpicker', {" - and that line has nothing to do with a site running out of a subfolder or the server root. Even the comment "See instructions in the source lines 31-35." in the install.txt doesn't help - the referenced lines are worthless because they don't contain any instructions...

It would be great, if someone could give a clear instruction on how to modify the editor_plugin.js in order to have a fully functional module even if the website is running out of a subfolder on the server.

Regards, Freddy

edit: I just saw this one here: http://drupal.org/node/559112 and tried comment #2 and #4 with no result.

peter törnstrand’s picture

Same problem here. My site is installed in a sub directory. Will try to get this fixed.

Update 1:

Ok here is what I came up with.

The reason the editor disappears when the plugin is enabled is because it's missing language packs. The line:
tinymce.PluginManager.requireLangPack('linkpicker');
makes the editor disappear if your using TinyMCE in any language other then english (haven't tested with other languages then swedish).

When you get the editor to appear again by commenting out the above line you get a 404 not found page when clicking the button if your
site is installed in a subdirectory.

Edit the line:
file : '/tinymce_linkpicker',

and add your subdirectory:
file : '/subdirectory/tinymce_linkpicker',

I'm still having troubles when clicking the nodes in the list. Will have a look at that too.

Update 2:

Further problems. The template files page-tinymce_linkpicker.tpl.php and page-tinymce_linkpicker_search.tpl.php are hard coded to only work on
sites installed in the root directory. You have to edit the templates and change the line:
var href = '/node/' + nid;

To:
var href = '<?php echo $base_path ?>' + 'node/' + nid;

Also, the javascript referenced in the template files does not exist. Replace the following line:

<script type="text/javascript" src="http://dscdev.valdev.org/sites/all/libraries/tinymce/jscripts/tiny_mce/tiny_mce_popup.js"></script>

with:
<script type="text/javascript" src="/subdirectory/sites/all/libraries/tinymce/jscripts/tiny_mce/tiny_mce_popup.js"></script>

Update 3:

The view need to be altered to allow for sites installed in sub directories.
Go to views and edit "tinymce_linkpicker". Edit the field "Node: Title" and the string under "Recreate output...". Remove the leading front slash from link.

Update 4:
After much struggle getting this module to work for me I decided to roll my own module instead. I'm going to add it the contrib repsoitory as soon as I get
a developer cvs account. Until then you can download the module named "Drupal link" from my Git account: http://github.com/petertornstrand/Drupal-link

peter törnstrand’s picture

Status: Needs review » Active

This will be fixed in the next release. The problem is that the module is designed to work like an internal TinyMCE plugin. That requires that the selected language for TinyMCE in WYSIWYG settings in available for the plugin. Since this module only ship with english language the editor disappears when any other language is selected.

peter törnstrand’s picture

Assigned: tronathan » peter törnstrand
Status: Active » Fixed

Fixed. Use latest dev snapshot.

Status: Fixed » Closed (fixed)
Issue tags: -MSIE, -MSIE6

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