Closed (fixed)
Project:
Link to content
Version:
5.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
16 Mar 2007 at 23:11 UTC
Updated:
11 Apr 2007 at 12:41 UTC
Jump to comment: Most recent file
I'm running Drupal 5.1, TinyMce 5.x-1.x-dev, LinktoContent 5.x-1.1.
I have everything installed and am able to see the link module, administer it, and see the button in TinyMce. I enabled the various content types to use and when I click on the button in TinyMce, a new window opens (not inline) and a javascript error appears that says: "Error: error". The list in the new window is empty.
Any help on what the problem could be?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | ltc.html | 830 bytes | stborchert |
Comments
Comment #1
keylope commentedForgot to mention that I only have LinktoContent and LinktocontentNode enabled. I don't have ..Category or Menu enabled as a module and do not have the Category module either.
Comment #2
stborchertHi.
Hm, the error message indeed isn't really helpful ;-)
Could you please try the following:
replace line 54 of functions.js (in tinymce/jscripts/tiny_mce/plugins/linktonode/jscripts) with
alert('Error: ' + msg + "\n" + exc.name + "\n" + exc.message);This should give a more detailed message and we could hopefully find the problem.
greetings,
Stefan
Comment #3
keylope commentedThanks for help!
I tried replacing the line and recieved a browser js error:
"exc has no properties"
If I try to just alert exc with no properties, it is undefined. Is there something within the xml that can be alerted to troubleshoot the problem?
Comment #4
stborchertHm, you can try to output the xml with
alert(xml);.But I wonder why "exc" is undefined if there is an error.
Or you can use the attached html file (insert the url to your drupal installation at line 9) to see the modules output.
Comment #5
stborchertErr: "Menu-Id" should be called "term-id".
If you leave the value "0" all top level terms and uncategorized nodes should be displayed (should look like
{ "categories": {...}, "nodes": {...} }).Comment #6
keylope commentedI tried using the ltc.html page, but it kept coming back with a page not found. When I checked out the url, it would show: http://www.example.com/?q=linktocontent (I replaced example with my own domain).
I changed the form action to include 'index.php?q=linktocontent' and it worked!
I remember seeing the link formed in functions.js similar to what you had in ltc.html and changed these to include 'index.php' and it worked as well!
Perhaps this is specific to my drupal environment, but another question is, will this work when I have clean urls enabled? Is the query parameter still accepted? Right now, I'm running on IIS (not my choice :p) but index.php is a default index page. But I didn't check the order, perhaps it's not the top-most default page. Unfortunately, I'm the middle man in this scenario. I didn't set up the server, so I had to play email tag with the server admin to get things along this far!
Regardless, thanks for your help in fixing my specific problem. Perhaps you could in the 'index.php' into the functions.js.. or not, this setup I'm on is a bit odd anyway!
Thanks!
Comment #7
stborchertDon't know if its IIS, but could you please check one more thing:
insert into functions.js (line 22; right after
function loadCategories(obj) {):alert(_getBaseHref());It should display the url of your drupal installation. If not there seems to be something wrong with tinyMCE's baseURL.
Comment #8
keylope commentedI alerted the results and it comes back with:
'http://www.example.com/'
Comment #9
stborchert? I'm confused. Was example.com the real result or did you replace your url for posting?
Comment #10
keylope commentedSorry for the confusion, that was the exact format that was alerted, but I changed the url for posting.
Comment #11
stborchertAh, ok.
Hm, if the url is "calculated" correct the ajax-call should have been correct, too.
Comment #12
stborchertComment #13
mfratoni commentedhi, don't work on windows+iis+php+mysql.
i've too a machine on linux+apache+mysql and on that work!
thanks
Comment #14
stborchertHi.
Could you please specify what is not working?!
What messages (javascript console, alert, etc.) appear?
Result of http://drupal.org/node/128545#comment-216223?
greetings,
Stefan
Comment #15
keylope commentedmfratoni,
See if this fixes your error:
Open functions.js
There are two links that look like: ?q=linktocontent
Add an "index.php" to the front of these links to look like: index.php?q=linktocontent
See if that fixes the problem.
Comment #16
stborchertHi.
I've checked in a new version of functions.js (linktonode and linktomenu) which calls "index.php?q=..." instead of "?q=...".
Could you please try them and report if its working.
linktonode/jscripts/functions.js
linktomenu/jscripts/functions.js
greetings,
Stefan
Comment #17
oprior commentedHi,
I only tried the linktonode version of your latest function.js docs, but I still get the "Error: error" alert.
Thanks for trying and keep up the great work! This module seems really useful and I would love to make it a part of my final site.
Kudos!!
Comment #18
stborchertHm, could you please check the versions of both files (see comment #16).
Lets say you've installed tinymce to sites/all/modules/tinymce.
Then go to
http://example.com/sites/all/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/linktonode/jscripts/functions.js(replace example.com with your url) and check the version string.It should be
// $Id: functions.js,v 1.10.4.5 2007/04/01 16:31:42 stborchert Exp $for linktonode and// $Id: functions.js,v 1.1.2.3 2007/04/01 16:31:41 stborchert Exp $for linktomenu. If its different please clear the cache (or try Shift+Reload).The same with linktomenu.
Hope this works.
greetings,
Stefan
Comment #19
stborchertPlease reopen if it isn't fixed.