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?

CommentFileSizeAuthor
#4 ltc.html830 bytesstborchert

Comments

keylope’s picture

Forgot 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.

stborchert’s picture

Hi.
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

keylope’s picture

Thanks 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?

stborchert’s picture

StatusFileSize
new830 bytes

Hm, 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.

stborchert’s picture

Err: "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": {...} }).

keylope’s picture

I 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!

stborchert’s picture

Don'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.

keylope’s picture

I alerted the results and it comes back with:

'http://www.example.com/'

stborchert’s picture

? I'm confused. Was example.com the real result or did you replace your url for posting?

keylope’s picture

Sorry for the confusion, that was the exact format that was alerted, but I changed the url for posting.

stborchert’s picture

Status: Active » Fixed

Ah, ok.
Hm, if the url is "calculated" correct the ajax-call should have been correct, too.

stborchert’s picture

Status: Fixed » Closed (fixed)
mfratoni’s picture

Version: 5.x-1.1 » 5.x-1.2

hi, don't work on windows+iis+php+mysql.

i've too a machine on linux+apache+mysql and on that work!

thanks

stborchert’s picture

Assigned: Unassigned » stborchert
Status: Closed (fixed) » Active

Hi.
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

keylope’s picture

mfratoni,

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.

stborchert’s picture

Status: Active » Needs review

Hi.
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

oprior’s picture

Hi,

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!!

stborchert’s picture

Hm, 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

stborchert’s picture

Status: Needs review » Closed (fixed)

Please reopen if it isn't fixed.