I've activated the module successfully but the linktonode button does not appear within any of the tinymce toolbars. When I go to the admin section for linktonode, only linktocategory appears as an option.

CommentFileSizeAuthor
#10 LinkToNodeRows.txt494 bytesjsgammato
#3 att_0.jpg196.07 KBianchan
#2 att.jpg213.13 KBianchan

Comments

stborchert’s picture

Assigned: Unassigned » stborchert

Hi.
Could you please send me (or attach) a screenshot of admin/build/modules (especially section "content"), and admin/settings/linktocontent.

greetings,

Stefan

ianchan’s picture

StatusFileSize
new213.13 KB

Thanks for your help..

attached file contains:

admin/build/modules » content section
admin/settings/linktocontent
/edit/ » tinnymce toolbars

ianchan’s picture

StatusFileSize
new196.07 KB

Sorry.. last attachment cutoff

stborchert’s picture

Hm, very strange.
I wonder why "Link to node" isn't displayed but "Link to category" is.
What happens on admin/settings/linktocontent if you disable "Linktocontent category" in admin/build/modules?

stborchert’s picture

Category: support » bug

Hi.
I did a fresh install on linux and windows and it worked as expected. Do you have a special system/webserver? Or special modules?
Could you please query the database (from console or phpmyadmin):
mysql> select * from variable where name like 'linktocontent_%_plugins'\G
On my system it results in (I've formatted the output for better reading):

*************************** 1. row ***************************
 name: linktocontent_enabled_plugins
value: a:3:{
  s:18:"linktocontent_menu";
  s:18:"linktocontent_menu";
  s:18:"linktocontent_node";
  s:18:"linktocontent_node";
  s:22:"linktocontent_category";
  s:22:"linktocontent_category";
}
*************************** 2. row ***************************
 name: linktocontent_registered_plugins
value: a:3:{
  s:6:"global";a:3:{
    s:18:"linktocontent_menu"; 
    s:18:"linktocontent_menu"; 
    s:18:"linktocontent_node"; 
    s:18:"linktocontent_node"; 
    s:22:"linktocontent_category"; 
    s:22:"linktocontent_category";
  }
  s:18:"linktocontent_menu";a:1:{
    s:18:"linktocontent_menu";
    s:18:"linktocontent_menu";
  }
  s:18:"linktocontent_node";a:2:{
    s:18:"linktocontent_node";
    s:18:"linktocontent_node";
    s:22:"linktocontent_category";
    s:22:"linktocontent_category";
  }
}

Do you have a similar result?

ianchan’s picture

Thanks for your help. I ran the query you gave me and the table only included the linktocontent_category settings. I manually inserted the additional settings and now the admin interface is displaying all three plugins of the module.

However, the toolbars in tinymce still will not display the linktonode icon. I tried reinstalling both the tinymce module and the tinymce. I un-checked, saved, and re-selected the linktonode button within the tinymce settings.

There was a time, several months ago when it was working. However, I cannot recall at what point the button stopped displaying.

ianchan’s picture

When I move tiny_mce_gzip.js and tiny_mce_gzip.php out of the /modules/tinymce/jscripts/tiny_mce/ directory the linktonode and linktomenu buttons appear. I did try adding the names of the two plugins to the list within tiny_mce_gzip.js. The spellchecker plugin does work the tinymce compression files.

stborchert’s picture

Hi.
Sorry for not responding so long but I had my final exams.

tiny_mce_gzip.php sounds like a good culprit for this problem.
Ok, lets try it:

  • Windows XP: did not work
  • gentoo linux: buttons are not visible

Ok, appended "linktonode" to settings.plugins in tiny_mce_gzip.js.
first refresh: no result.
deleted the *.gz file in modules/tinymce/tinymce/jscripts/tiny_mce and refresh: no result.

Hm, strange.

Ah, I got it.
TinyMCE-Compressor suggests there is a pluginname_src.js. In case of linktonode and linktomenu there aren't such files!
Just copy linktonode/editor_plugin.js to linktonode/editor_plugin_src.js and do the same with linktomenu.
Now delete tiny_mce_*.gz (its the cache-file) and reload the node create page.
Hopefully the buttons are visible now.

greetings,

Stefan

stborchert’s picture

Hi.
Version 5.x-1.6 now uses compressed "editor_plugin.js" files and "editor_plugin_src.js". Could you please test and verify its working.

greetings,

Stefan

jsgammato’s picture

Version: 5.x-1.4 » 5.x-1.6
StatusFileSize
new494 bytes

I installed 5.x-1.6 and the buttons do not appear for me, either.
I ran the query you suggest above, and it does not look quite kosher, but then I don't know what I am looking at!
(the query failed when I used the /G switch, so I simply deleted it and ran it again.)
I have attached LinkToNodeRows.txt - maybe you can find a clue in there.
I do not have Category enabled.

My writers and I love the feature, so we were disappointed when it disappeared a few weeks ago. I hope we can get it back!

stborchert’s picture

Hi, John.
The query result looks good. Do you have tiny_mce_gzip enabled?
If so, please clear its cache by removing modules/tinymce/tinymce/jscripts/tiny_mce/*.gz.
If not, yould you please have a look at modules/tinymce/plugin_reg.php if linktonode and linktomenu are included.

greetings,

Stefan

jsgammato’s picture

I have no .gz in that directory.
In plugin_reg.php there is no mention of linktonode or linktomenu. The file date is June 30.

stborchert’s picture

Ah, the solution is near.
While installing "Linktocontent Node" and "Linktocontent Menu" were there any error messages ("File not writable" or something similar)?

You can edit plugin_reg.php and insert

   // 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');
   }

for both sub-modules right before

     return $plugins;
   }

.
After this you should be able to select the plugins in your TinyMCE-profile.

hth,

Stefan

ianchan’s picture

Status: Active » Fixed

Yes! The buttons are now appearing with tiny_mce_gzip.js and tiny_mce_gzip.php placed in the same directory as tiny_mce.js (modules/tinymce/tinymce/jscripts/tiny_mce/).

Thank you for updating the module and fixing the problem.

jsgammato’s picture

I got it working by editing plugin_reg.php as described int he readme. I don't know why it was not automatic, but I am happy that it works for me, anyway. Thanks!

stborchert’s picture

Status: Fixed » Closed (fixed)

To both of you: good to hear!
I've modified the auto-installer in the current development version to not abort the installation if there are any write problems with plugin_reg.php so the install problems should go away forever (hopefully).

Thanks for your feedback,

Stefan