I would really like to see the LinkToContent module integrated into FCKeditor for Drupal 6. I like FCKeditor much better than TinyMCE, but this is one addition that's really needed.
Using the version of LinkToContent discussed at http://drupal.org/node/252938, I've gotten the buttons to appear in FCKeditor, but I get an error when the pop-up window opens.
Error on retrieving data from module.
TypeError
$(select).addOption is not a function
If I close the error message and the pop-up, then click the link to node button again, the pop-up opens and I can use the category drop down to select the term for the article I'm looking to link to, but a list of articles doesn't appear.
As I said, this is a needed add-on for FCKeditor, so I hope someone is able to figure out how to get it to work properly.
Thanks.
Comments
Comment #1
nw CreditAttribution: nw commentedI've had my head down for a few hours and have Drupal 6, FCKEditor, and LinkToContent providing basic functionality. I'm not in a position to publish any code as I've hacked this together. However, I welcome contact from parties interested in collaborating on work towards a distributable patch and/or instructions.
Comment #2
wwalc CreditAttribution: wwalc commented@nw: could you send me a PM with link to this code (or a patch)?
Comment #3
wwalc CreditAttribution: wwalc commentedOk, I've added experimental support for Link to content/node integration in CVS. It should be available in an hour as a dev release. Let me know if you find any issues with it.
Comment #4
RWWood CreditAttribution: RWWood commentedI'm using the link to content version that's in linktocontent-fckeditor-6.x-2.x-dev with fckeditor-6.x-2.x-dev. The pop-up for link to node appears and allows me to drill down through the taxonomy categories to the parent of the item I want to use, but nothing appears in the list.
Also, sometimes I get an error message when the pop-up first appears:
Error on retrieving data from module.
TypeError
$(select).addOption is not a function
If I then close the error pop-up and the link-to-node pop-up, then re-open the link-to-node pop-up, I get the same results as above, ie. no list of nodes to link to.
With link-to-menu, there is nothing in the list.
Comment #5
RWWood CreditAttribution: RWWood commentedComment #6
wwalc CreditAttribution: wwalc commentedHummm this is something that I cannot reproduce on my Drupal installation. Could you provide me a list of steps to reproduce this starting with a fresh Drupal installation?
Alternatively, any chance to see this bug live (use PM to send me a link)?
Comment #7
RWWood CreditAttribution: RWWood commentedThis is a fresh install of Drupal 6.8 and I have all other modules disabled except taxonomy, fckeditor, and link-to-content. I'm running this on a local server, so I don't have a URL you can visit. Is there any reason I'd have problems on an Apache server running on Windoze rather than Linux?
Thanks
Comment #8
wwalc CreditAttribution: wwalc commentedI have installed the following on my local WAMP server:
- Drupal 6.8 + clean URL's disabled
- FCKeditor 6.x-2.x-dev 2008-Dec-17
- FCKeditor 2.6.3
- Experimental version of Link to content module: http://drupal.fckeditor.net/download/linktocontent-fckeditor-6.x-2.x-dev...
- Enabled Linktocontent, Linktocontent Menu, Linktocontent Node, FCKeditor
- uncommented in fckeditor.config.js: FCKConfig.Plugins.Add(...) and enabled 'LinkToNode','LinkToMenu' buttons
- created Cars taxonomy associated with Page content type
- created simple page with tags "Ford, Toyota"
- now I made an attempt to reproduce this issue and I've got it! The problem is that Link to content module should be properly installed first :P
Go to: admin/settings/linktocontent, enable Link to menu and Link to node plugins (actually I don't know why, because I've already installed such module).
That's not all, you should also click on a "edit settings" link and associate those plugins with selected content type.
After setting up the Link to content module, I've made another attempt to use it, I've clicked on a "link to node" button inside of FCKeditor and it started working.
Comment #9
RWWood CreditAttribution: RWWood commentedDuh. I'm an idiot. I totally missed the configuration for Link to content.
Thanks. It works like a charm.
Comment #10
wwalc CreditAttribution: wwalc commentedWell... I must admit that the first time I tried to install this module I couldn't get it working either, due to the same problem, that's why I could be so smart this time ;)
Comment #12
jlmeredithComment #13
ypfuquen CreditAttribution: ypfuquen commentedWhich one is the patch??? where i can fin it...
Does any body is actually using link to node in FCKeditor displaying the categories?? I need a filter...
Please any help welcome..
Comment #14
wwalc CreditAttribution: wwalc commentedThe status of this ticket has been set to fixed already, there is nothing to patch.
Instructions regarding Linktocontent module are in README file.
Comment #16
mattez CreditAttribution: mattez commentedMy site is multilingual. English (default) / Czech.
linktonode works fine but shows only nodes in English.
No matter if I'm editing node under English or in Czech.
Any hints? Anybody with experience with setup linktonode on multilingual page?
Don't you know if it's bug or wrong setup?
Thanx a lot...
P.S.
I've tried to play with fckeditor.config.js settings:
FCKConfig.Plugins.Add( 'linktonode', 'en,cs' ) ;
FCKConfig.Plugins.Add( 'linktomenu', 'en,cs' ) ;
but with no result (sure). Than I found its availableLanguages: a list of available language files for the plugin.
It's only for translation of UI? Or what is it good for?
Comment #17
wwalc CreditAttribution: wwalc commentedIn
FCKConfig.Plugins.Add( 'linktonode', 'en,cs' ) ;
you're instructing FCKeditor to use specified language files from sites\all\modules\fckeditor\plugins\(linktonode)\lang directory.
I'm not sure why do you see only English nodes it seems that it works fine on my local installation... Are you using Drupal 6? Could you write an instruction on how exactly did you setup multilingual site?
Comment #18
Jorrit CreditAttribution: Jorrit commentedClosed because of inactivity.
Comment #19
higherform CreditAttribution: higherform commentedI know I'm commenting to a closed issue, but I'm hoping this might get a bit more attention...
Downloaded http://ftp.drupal.org/files/projects/linktocontent-6.x-2.x-dev.tar.gz and installed per #8... linktonode worked fine under D6.13 (with clean URLs on), fckeditor 2.6.4.1 and 6.x-1.4-rc1, but linktomenu only resulted in an apparent AJAX error.
My other problem is that linktonode generates a link to the alias'ed path, not node/nodeid... so if the title of the page changes, the link to it goes invalid on most of the sites we have set up for our clients.
Let me see how hard this would be to patch..
Comment #20
freddyseubert CreditAttribution: freddyseubert commented@higherform: any updates regarding the patch?
Comment #21
Equinger CreditAttribution: Equinger commentedI would also like to see updates here. I am only seeing 'Primary Links' available in 'LinktoMenu.' Do not think that this was a problem prior to adding OG. Any thoughts?
Comment #22
jpshayes CreditAttribution: jpshayes commentedSubscribing
Comment #23
alek123 CreditAttribution: alek123 commentedSubscribing
Comment #24
momper CreditAttribution: momper commentedwhat about integration of http://drupal.org/project/tinymce_node_picker
Comment #25
not_Dries_Buytaert CreditAttribution: not_Dries_Buytaert commentedSubscribing
Comment #26
matkeane CreditAttribution: matkeane commented@19 - I've just run into the problem of the LinkToNode module setting the href using the path alias, rather than an more future-proof 'node/nid' link.
In linktocontent_node.module, the '_linktocontent_node_get_nodes' function runs the 'node/nid' paths through the Drupal url() function, which returns an alias if one exists. A quick hack is to add an option to tell the url function that the path is already an alias:
url('node/'. $node->nid, array('alias' => true));
... and ...
$obj->href = url('taxonomy/term/'. $obj->nid, array('alias' => true));
... which returns a path without converting it to a path alias, so now I can fix my path aliases without messing up internal links.
Comment #27
robbertnl CreditAttribution: robbertnl commentedSubscribing
Comment #28
glenshewchuck CreditAttribution: glenshewchuck commentedFYI: For those who are thinking of upgrade, on Drupal 6.17 I get a not compatible with core (big red X) so I can't install.
Comment #29
thomastsang CreditAttribution: thomastsang commentedfunny, i cannot run this integration, as link 'node/x' will not pass to the link in the content.
The new button 'LinkToNode' is shown, pop up is working, node list is loaded, however, empty link is created when i pick a node in the list and click ok in the popup. (i.e. In context of html, <a href="">title xxxx</a> is created, instead of <a href="node/x">title xxxx</a>)
When i looked on the code, i found function insertAction() in sites\all\modules\fckeditor\plugins\linktonode\jscripts\function.js is the one doing exact what i mentioned above, however, the code is running in tinyMce mode, not fckeditor!!!!!!!!!!!
I am very confuse now, especially how people does make this working!!!! Please correct me if i am wrong, also, how can i fix the problem?
Thank you so much~ Great integration, great work :)
Enclosed code on function insertAction()
Comment #30
thomastsang CreditAttribution: thomastsang commentedI found that there are some injection codes to replace the function.
I also found that order of loading js files may causes problem on the integration.
Do anyone encounter the problem?
According to my result, js files must load in such order to work: fck_link.js, function.js and fck_util.js.
How can i ensure the order of loading these js files?????
Any advice please?
Comment #31
thomastsang CreditAttribution: thomastsang commentedEnhance the script in fck_linktonode.html at sites\all\modules\fckeditor\plugins\linktonode
Change the seq to jquery, function, fck_link and utils.
FYR
From
To
Finally, it works in most latest browser (i.e. chrome, ie8 and firefox 3)