Upon installing linktocontent on a fresh Drupal 5.1 installation, the buttons do not appear in TinyMCE on both the MSIE6 and MSIE7 browser.

Here are my step-by-step instructions:

Installing Link to Content

  1. Move the unpacked "linktocontent" directory to C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules
  2. Move the 2 subdirectories in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\linktocontent\tinymce_plugins to C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\tinymce\tinymce\jscripts\tiny_mce\plugins
  3. Register the plugin with TinyMCE by adding the following lines to C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\tinymce\plugin_reg.php (right after the last $plugins['easylink'] entry around line 47):
    // linktocontent.module: linktonode
    if (is_dir(drupal_get_path('module', 'tinymce') . '/tinymce/jscripts/tiny_mce/plugins/linktonode/')) {
      $plugins['linktonode'] = array();
      $plugins['linktonode']['theme_advanced_buttons3'] = array('linktonode');
    }
    // linktocontent.module: linktomenu
    if (is_dir(drupal_get_path('module', 'tinymce') . '/tinymce/jscripts/tiny_mce/plugins/linktomenu/')) {
      $plugins['linktomenu'] = array();
      $plugins['linktomenu']['theme_advanced_buttons3'] = array('linktomenu');
    }
    
  4. After the module and the TinyMCE plugin have been installed, enable the module:
    1. Go to "Administer", "Site building", "Modules": http://localhost/admin/build/modules
    2. Tick Linktocontent, Linktocontent Menu and Linktocontent Node in the "Content" section and click "Save configuration"
  5. This module currently does not trigger the adminrole module. The admin permissions must be specified by hand for now. Go to "Administer", "User management", "Access control": http://localhost/admin/user/access
    1. linktocontent module: enable "administer linktocontent" for the admin role
    2. Click "Save permissions"
  6. Go to "Administer", "Site configuration", "Link to content": http://localhost/admin/settings/linktocontent
    1. Disabled plugins: enable "Link to menu" and "Link to node"
    2. Click "Save configuration"
  7. Enable the Link to Content plugins in the TinyMCE profile(s)
    1. Go to "Administer", "Site configuration", "TinyMCE" http://localhost/admin/settings/tinymce
    2. Edit each relevant profile by clicking "edit" to the right of each relevant profile
    3. In Buttons and plugins, enable "linktomenu" and "linktonode"
    4. Click "Update profile"

The bug appeared when executing these steps in the following order: 1 - 2 - 3 - 4 - 7 - 5 - 6

I did not try yet the installation procedure in the sequence 1 - 2 - 3 - 4 - 5 - 6 - 7.

Comments

stborchert’s picture

Assigned: Unassigned » stborchert

Hi.

Upon installing linktocontent on a fresh Drupal 5.1 installation, the buttons do not appear in TinyMCE on both the MSIE6 and MSIE7 browser.

Did you try any other browser?

Here are my step-by-step instructions:

1. ok
2. ok
3. you don't need to do this because its done during installing the contrib modules (linktocontent_node, linktocontent_menu)
4. ok
5. I don't get this. How should the module trigger adminrole?
6. ok (did you make additional settings for linktomenu/linktonode?)
7. ok

Seems all fine. I would mind that it isn't a problem with linktocontent because the buttons aren't displayed if there's something wrong with plugin_reg.php or the tinymce profile itself.
Could you try please steps 1-2-4-(5-)6-7.

ShutterFreak’s picture

Did you try any other browser?

I did not try another browser at the moment: only MSIE6 and MSIE7. I now also tested with the Mozilla FireFox 2.0.0.3 browser, with the same result.

3. you don't need to do this because its done during installing the

contrib modules (linktocontent_node, linktocontent_menu)

I was unaware of this. The documentation told me to edit those files manually.

5. I don't get this. How should the module trigger adminrole?

I use the adminrole module for setting "admin" privileges to a given role (which I gave the name "admin"). I don't know how adminrole interacts with other modules; it probably hooks in the module registration API, which I am not familiar with. I will definitely retest this path.

ok (did you make additional settings for linktomenu/linktonode?)

Initially not, but now I did enable all content types for both linktomenu and linktonode. I still don't see the buttons though.

I repeatedly edited the TinyMCE profile by disabling and then reenabling both linktocontent plugins, still to no avail.

Could you try please steps 1-2-4-(5-)6-7.

I will do a fresh Drupal reinstall this afternoon.

Does it matter that I have both Organic Groups and OG Mandatory Group modules active?

Cheers,

Olivier

stborchert’s picture

The documentation told me to edit those files manually.

:-) Only if the auto-installer didn't work.

Does it matter that I have both Organic Groups and OG Mandatory Group modules active?

No, this shouldn't matter.
I've send you a personal msg to give you my mail...

stborchert’s picture

I've send you a personal msg to give you my mail...
Err, the "contact"-function seems to be not working at the moment. I'll try again later...

stborchert’s picture

Status: Active » Postponed (maintainer needs more info)

Hi.
Any status update?

ShutterFreak’s picture

No update yet.

Maybe this: which jQuery version does Link to content need? So far I am using the one shipped with Drupal 5.1.

Best regards,

Olivier

stborchert’s picture

Status: Postponed (maintainer needs more info) » Active

5.x-1.2 only works with the jQuery version shipped with drupal.
The newest version of LinkToContent (1.5) works with both, the old jQuery and the newer one that comes with jquery_update.module.

stborchert’s picture

Status: Active » Postponed (maintainer needs more info)

Hi.
Are the buttons still hidden?
You do not use tiny_mce_gzip, don't you!?

greetings,

Stefan

ShutterFreak’s picture

Hi Stefan,

I am indeed using tiny_mce_gzip. I will install linktocontent again on another Drupal 5.1 installation (and make sure I am not using tiny_mce_gzip this time), and see how it works.

Best regards,

Olivier

stborchert’s picture

Haha, I'm a magician :-)
As posted in #151671 try to copy linktonode/editor_plugin.js to linktonode/editor_plugin_src.js and do the same with linktomenu.
TinyMCE_Gzip searches for {...}_src.js which is missing for each module.

greetings,

Stefan

ShutterFreak’s picture

I installed version 1.5 (currently disabled tiny_mce_gzip), and this time I see the linktonode button (on the 3rd row)!

However I get a JavaScript error when the linktonode popup window appears:

Error on retrieving data from module.
Type Error
Object expected.

I did not install any update to jQuery, so I still run the "vanilla jQuery" as shipped with Drupal 5.1.

Thanks for your support!

Olivier

stborchert’s picture

Version: 5.x-1.2 » 5.x-1.5
Component: User interface » Code
Status: Postponed (maintainer needs more info) » Active

and this time I see the linktonode button

Fine.

However I get a JavaScript error when the linktonode popup window appears

Argh.
Hm, with Firefox its working but with IE we get this error message (just installed a fresh copy).
I have to test a while before I can say more...

greetings,

Stefan

stborchert’s picture

StatusFileSize
new8.74 KB

Ok, I got it.
Don't know why, but IE didn't load the additional js-files anymore.
Could you please try the attached version of functions.js for linktonode (it includes all other js-files).
If it's working I will create a new release.

greetings,

Stefan

ShutterFreak’s picture

Hi Stefan,

Thanks for your quick replies!

I uploaded your JS file (for linktonode), and now the popup works for both FireFox and MSIE7.

I realize I forgot to specify which node types should participate in Linktonode. I ticked all node types, so now the list is not empty anymore :)

Just one question: will a similar patch be required for linktomenu? Would the same file do the job?

Thank you very much for your support, Stefan!

Cheers,

Olivier

stborchert’s picture

StatusFileSize
new8.97 KB

Hi.

I uploaded your JS file (for linktonode), and now the popup works for both FireFox and MSIE7

Puh, good to hear.

will a similar patch be required for linktomenu?

Yes, linktomenu needs this, too.

Would the same file do the job?

No, unfortunately not. But you can use the file I attached.

greetings,

Stefan

ShutterFreak’s picture

Thanks!

I guess the issue may now be closed.

stborchert’s picture

Status: Active » Fixed

Great.
I'll close it after creating the new release (can't do it now).

Thanks for you bug tracking and your patience.

Stefan

stborchert’s picture

Status: Fixed » Closed (fixed)

done