Follow up from http://drupal.org/node/123857.

Error: $("#statusImg").top is not a function
Code: http://www.example.com/modules/tinymce/tinymce/jscripts/tiny_mce/plugins... Line: 41

Ah, "misc/jquery.js" doesn't seem to be loaded. Could you please open the popup window and then view the source (Firefox: "view -> show source"). There should be a line like
<script type="text/javascript" src="http:///www.example.com/misc/jquery.js"></script>
If its not there there is a problem with generating your drupal url.
To see whats wrong please follow these steps:
1. open modules/tinymce/.../plugins/linktomenu/popup.php in an editor
2. insert alert(url); after line 26 and save popup.php
3. go to your site and click the button "linktomenu" in tinymce

Now a message with the generated drupal-url should popup. Does this url equals your real url?

CommentFileSizeAuthor
#13 ltc_1.html867 bytesstborchert

Comments

dcoun’s picture

I have the following instead:

<script type="text/javascript">
   function appendScripts() {
     var jquery = document.createElement("script");
     var functions = document.createElement("script");
     var url = tinyMCE.baseURL.substring(0, tinyMCE.baseURL.indexOf('modules/'));
     if (url.indexOf('sites/') > -1) {
       url = url.substring(0, url.indexOf('sites/'));
     }
     jquery.type = functions.type = "text/javascript";
     jquery.src = url + "misc/jquery.js";
     functions.src = "jscripts/functions.js";
     document.getElementsByTagName("head")[0].appendChild(jquery);
     document.getElementsByTagName("head")[0].appendChild(functions);
   }
   appendScripts();
  </script>

When inserting alert(url); I get an error in console "url is not defined"

stborchert’s picture

I have the following instead:...

Hm, youre right.

When inserting alert(url); I get an error in console "url is not defined"

Youre code (in popup.php) should look like this:

     var url = tinyMCE.baseURL.substring(0, tinyMCE.baseURL.indexOf('modules/'));
     if (url.indexOf('sites/') > -1) {
       url = url.substring(0, url.indexOf('sites/'));
     }
alert(url);
     jquery.type = functions.type = "text/javascript";
     jquery.src = url + "misc/jquery.js";
dcoun’s picture

I got : http://www.example.com/
This is the main page in my drupal (The domain changed to "example")

dcoun’s picture

So what is next ? Any idea how to solve it? Thank you in advance

stborchert’s picture

The path is correct, so jquery.js should be loaded.
Hm, what does alert($('#statusImg')); display if you insert this into functions.js line 40?

dcoun’s picture

it is shown: [object Object]

stborchert’s picture

it is shown: [object Object]

Looks good.

And what about alert($('#statusImg').top()); or alert($('#statusImg').top);?

What version of jquery.js do you have (misc/jquery.js)?
// $Id: jquery.js,v 1.6 2006/12/23 21:46:35 dries Exp $

In newer versions .top(...) isn't defined anymore. There is .css({top: ...}); instead.

dcoun’s picture

The first shows nothing but the same error exist in firefox's error console.
The second shows a message: undefined
I had the above with // JQuery 1.1.2 from jquery_update module
I change it with jquery.js,v 1.6 2006/12/23 from original Drupal 5.1 tarball
I am getting now in firefox's error console but the user waits again in the "Loading" ball:
Error: missing ) in parenthetical
Code: http://www.enosigi.gr/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/...
Line: 51, Col: 31
Code: "hasChildren": true } } }

Executed 15 queries in 22.87 milliseconds. Queries taking longer than 5 ms and queries executed more than once, are highlighted.
dcoun’s picture

How we can change the domain in the above comment to show : example.com ?

stborchert’s picture

How we can change the domain in the above comment to show : example.com ?

I worry we can't. But you may ask one of the webmasters to change this.

I had the above with // JQuery 1.1.2 from jquery_update module

Ha! I knew you didn't tell me all your config :-)

I'm trying to update my js-files to work with the newer jquery. Until its done you could try to replace
$("#statusImg").top(top + "px").show(); with
$('#statusImg').css({top: top + "px"}).show(); (in functions.js).
Don't know if its the only change but it could work (uh, I see I'll have to rewrite at least dropdown.js: its only partially using jQuery magic).

Error: missing ) in parenthetical...Executed 15 queries in 22.87 milliseconds....

You've got devel.module activate, right!?
Please disable it and try again. Its printing some infos at the bottom of each output page, so it does with the result page wich is sent to the plugin-window. Therefore the data has the wrong format and the error occurs.

greetings,

Stefan

dcoun’s picture

thank you Stefan,
I disabled the devel module and I use the original jquery for the moment and linktomenu works ok for now. I have many modules and a lot of things can happen, sorry...
The linktonode does the same and gives the error in firefox's error console:
Error: missing ) in parenthetical
Code: http://www.example.com/modules/tinymce/tinymce/jscripts/tiny_mce/plugins...
Line: 57, Col: 20
Code:
({ "message": null }{ });

stborchert’s picture

I have many modules and a lot of things can happen, sorry...

No, you don't have to be sorry. I can't test all possibilities and am happy if someone finds an error (that can be fixed).

linktomenu works ok for now

Ok, I'll change the code to work with newer versions of jquery.

The linktonode does the same and gives the error in firefox's error console:...({ "message": null }{ });

Argh.
Hm, don't know why this error is given. The string looks fine (although there is an other error).
Could you please try the attached file, insert your url into the source (line 9: <form action="...". Insert a vocabulary-id and submit this form. It should at least display something like this: { "categories": {...}, "nodes": {...} }

hth,

Stefan

stborchert’s picture

StatusFileSize
new867 bytes

forgot the file...

dcoun’s picture

The page source result from the attached page is: { "message": null }{ }
But at the same time, I get the following errors in the admin/settings/linktocontent page:

# warning: Invalid argument supplied for foreach() in /home/xx/public_html/modules/linktocontent/linktocontent.module on line 163.
# warning: Invalid argument supplied for foreach() in /home/xx/public_html/modules/linktocontent/linktocontent.module on line 172.
# There seems to be an error with the installation of linktocontent_category. Please check you copied all files from linktocontent/tinymce_plugins/ to the TinyMCE plugin directory.
stborchert’s picture

Ah, we're getting closer.
Could you please do a query on your database (using phpMyAdmin or something similar):
SELECT * FROM variable WHERE name = 'linktocontent_registered_plugins';

It should look like

mysql> SELECT * FROM variable WHERE name = 'linktocontent_registered_plugins'\G
*************************** 1. row ***************************
 name: linktocontent_registered_plugins
value: a:3:{s:6:"global";a:2:{s:18:"linktocontent_menu";s:18:"linktocontent_menu";
s:18:"linktocontent_node";s:18:"linktocontent_node";}
s:18:"linktocontent_menu";a:1:{s:18:"linktocontent_menu";s:18:"linktocontent_menu";}
s:18:"linktocontent_node";a:1:{s:18:"linktocontent_node";s:18:"linktocontent_node";}}

If you'd like to you could send me the results via mail.

There seems to be an error with the installation of linktocontent_category.

Hm, did you install and activate this?
Don't wonder if you can't find plugin-files for linktocontent_category: there aren't any (its only an extension of linktocontent_node).
very weird...

dcoun’s picture

It gave me:

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";}}

I had installed in the past the category module but I disabled it.

stborchert’s picture

Have you disabled linktocontent_category, too?

dcoun’s picture

I enabled category and taxonomy-wrapper, I disabled taxonomy-wrapper & all linktocontent modules and I enabled again all linktocontent except the linktocontent-category module.
I tryied to update variable table with content from http://drupal.org/node/147025#comment-252208
I always get the error described in http://drupal.org/node/147025#comment-251638 and the above errors in the admin/settings/linktocontent page

dcoun’s picture

Forgot to say that all category modules are disabled

stborchert’s picture

Ok, lets start a new try. Please reinstall all linktocontent* modules:
1. go to admin/build/modules
2. unselect linktocontent and all of its submodules (...node, ...menu, ...category).
3. go to admin/build/modules/uninstall
4. select all modules (linktocontent*) and submit this page
5. look into tinymce/plugin_reg.php if the linktocontent-specific strings are removed
6. go to admin/build/modules again and install linktocontent, linktocontent menu and linktocontent node again
7. enable linktonode and linktomenu on admin/settings/linktocontent and set up the content types and menus you'd like to
(8. check the variable-table in your database SELECT * FROM variable WHERE name LIKE 'linktocontent%';)

Hopefully its now working.

dcoun’s picture

Status: Active » Fixed

I re-installed linktocontent modules after deleting and cleaning in DB the previous installation.
Everything is working ok now.
Thank you very much for your time.

stborchert’s picture

Status: Fixed » Closed (fixed)

Good to here. I will create a new version to work with newer jquery version within the next days.