In order to run modules linktonode and linktomenu with FCKEd I've installed FCKEd 2.6.3. , FCKEd module 5.x-2.2-rc1, module linktocontent 5.x-1.7 and tinyMCE 5.x-1.9 due to a dependency. I've configured everything (copied plugins from linktocontent into embedded tinymce plugin directory, enabled nodes and menus in linktocontent admin settings and enabled the modules in question in fckeditor.config.js) and I can see LinkToNode and LinkToMenu buttons in my FCKEd toolbar just fine.
But when I click it, loading icon appears in a popup window and then... nothing - only titles Node title Created Author
are displayed where the list of nodes to select from should be.
Firebug tells me the Post request was ltc-type=linktocontent_node<c-vocab-id=-1
and the Response { "message": " isn\'t a valid type name for Link to content" }[ ]
.
Also I get an error message from Drupal saying:
* warning: Invalid argument supplied for foreach() in /etc/drupal/5/sites/all/modules/linktocontent/linktocontent.module on line 163.
* warning: Invalid argument supplied for foreach() in /etc/drupal/5/sites/all/modules/linktocontent/linktocontent.module on line 172.
which tracks back to the actual code:
// Sort plugins by weight.
$weights = variable_get('linktocontent_plugin_weight', array());
foreach ($plugins as $plugin_name) {
$plugins[$plugin_name] = (isset($weights[$plugin_name]) ? $weights[$plugin_name] : 0);
}
if (is_array($plugins)) {
asort($plugins, SORT_NUMERIC);
}
// Retrieve the data.
$data = array();
$args = $_POST;
foreach ($plugins as $plugin_name => $weight) {
$data = module_invoke($plugin_name, 'get_data', $args, $data);
}
Maybe I've overlooked something or maybe this is a known bug since this feature is still new to FCKEd?
Comments
Comment #1
wwalc CreditAttribution: wwalc commentedGo to admin/settings/linktocontent and enable both plugins. Then edit Link to node settings (admin/settings/linktocontent/linktocontent_node) and check all available content types. Do the same thing for Link to menu.
Let me know if that worked for you.
Comment #2
charmer CreditAttribution: charmer commentedWell, thanks a lot, it did work - I had both plugins enabled but indeed overlooked to set up the settings for them.
I must say, this feature is very cool and very _important_ for casual users of any CMS and I have two more things to add since they are still on topic:
1) Link to node/menu buttons work somewhat differently - when creating a normal link I select the chunk of text first and then make it a link. By using link to content, if I select the chunk of text, it gets replaced by the title of a node I select then. That's somewhat confusing IMO.
2) I'd like to keep the number of modules I put into my install profile to a minimum. Would it be possible to port Link to content module or possibly develop a new and similar one that wouldn't be dependant on TinyMCE?
Thanks again.
Comment #3
wwalc CreditAttribution: wwalc commentedThat's great. Took me couple of minutes to figure out what was the problem too.
Regarding 2)
Link to content module has a new maintainer and I believe it is now under heavy development. I suppose we might want to keep support for this module "experimental', but also provide an easy way to install it at this moment.
As you noticed, Link to content module contains lots of TinyMCE dependencies. Patching may not be the easiest thing to do for most people, so it would be great if they also had something ready to download and install.
Here's the modified version of "Link to content" section available in README.txt. Would you be willing to test it and let me know if it's better? Please uninstall current TinyMCE and Linktocontent module, remove TinyMCE folder and upload one of the linktocontent-fckeditor packages.
Comment #4
charmer CreditAttribution: charmer commentedIt works!
I went with 5.x-2.x-dev and proceeded as you instructed.
Also, I'm no programmer, but I can see the in the patch file that the number of changes is very small and l have an impression that it may not be a hard work at all to accomodate the module so that it would detect the editor installed or check for its existence after the admin of the site sets either editor up. After all, LinkToContent module is compatible with both editors.
If this is indeed the case it may a good idea to bring this issue to a new LinkToContent maintainer's attention. What do you think?
Thanks again.
Comment #5
wwalc CreditAttribution: wwalc commentedComment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
charmer CreditAttribution: charmer commentedAny chance FCKEditor could be made compatible with D6 version of linktocontent module?
http://drupal.org/node/252938
Comment #8
wwalc CreditAttribution: wwalc commentedBecause Link to content has not been ported to D6, an experimental version of this module with FCKeditor support is available since some time, check README.txt attached to FCKeditor module for instructions. Please create another separate issue if you find any errors in it.