Page 1 of 2

JavaScript Errors in Admin-Interface

Posted: Thu Jan 04, 2007 3:33 pm
by cybermat
Hi,

i got some problems with one of my serendipity-blogs. All buttons in the admin-interface doesn't work anymore. When i try to klick on them, i got errors like:
wrapSelection is not defined
or:
wrapSelectionWithLink is not defined
or:
parent.self.opener.serendipity_imageSelector_addToBody is not a function
Don't know what happend. The errors occured in a 1.0.4 installation. I made the update to version 1.1. without success, the errors are still the same.

Has anyone an idea what i could do?

Thanks,

Mat

Re: JavaScript Errors in Admin-Interface

Posted: Thu Jan 04, 2007 3:47 pm
by garvinhicking
Hi!

It seems that your browser is not loading the "serendipity_editor.js" file anymore. Does the file still exist on your server?

Regards,
Garvin

Posted: Thu Jan 04, 2007 3:52 pm
by cybermat
Yes, i checked that file. It exists on the server and is readable to everyone. I forgot to say, that nothing changed on my installation. It worked fine for many months, and suddenly that errors occured. I didn't installed any new plugins or did some changes on my webspace....

Posted: Thu Jan 04, 2007 4:20 pm
by garvinhicking
Hi!

Can you check your browsers error console to see if you get more previous errorS? Check the HTML output of the admin page and see if the <script src="serendipity_editor.js"> line is contained there. Try to open that URL with your browser and see if it loads the .js file?

Regards,
Garvin

Posted: Thu Jan 04, 2007 4:39 pm
by cybermat
Hi Garvin,

i can open the serendipity_editor.js-File with my browser, without any problems (http://mittagstisch-ka.de/serendipity_editor.js).
When i try some buttons i get the known errors. When i open the medialibary i got a lot of warnings:

Warnung: Das Stylesheet http://mittagstisch-ka.de/serendipity_a ... area]=body wurde geladen, obwohl sein MIME-Typ, "text/html", nicht "text/css" ist.
Quelldatei: http://mittagstisch-ka.de/serendipity_a ... area]=body
Zeile: 0

Warnung: Selektor erwartet. Regelsatz wegen ungültigem Selektor ignoriert.
Quelldatei: http://mittagstisch-ka.de/serendipity_a ... area]=body
Zeile: 1

Warnung: ',' oder '{' erwartet, aber 'SetCookie' gefunden. Regelsatz wegen ungültigem Selektor ignoriert.
Quelldatei: http://mittagstisch-ka.de/serendipity_a ... area]=body
Zeile: 27

Warnung: ',' oder '{' erwartet, aber 'rememberOptions' gefunden. Regelsatz wegen ungültigem Selektor ignoriert.
Quelldatei: http://mittagstisch-ka.de/serendipity_a ... area]=body
Zeile: 34

Warnung: Selektor erwartet. Regelsatz wegen ungültigem Selektor ignoriert.
Quelldatei: http://mittagstisch-ka.de/serendipity_a ... area]=body
Zeile: 53

Warnung: Unerwartetes Dateiende beim Suchen nach 'Schließendes } eines ungültigen Regelsatzes'.
Quelldatei: http://mittagstisch-ka.de/serendipity_a ... area]=body
Zeile: 60

Warnung: Das Stylesheet http://mittagstisch-ka.de/serendipity_a ... area]=body wurde geladen, obwohl sein MIME-Typ, "text/html", nicht "text/css" ist.
Quelldatei: http://mittagstisch-ka.de/serendipity_a ... area]=body
Zeile: 0

These errors repeat many times....

Posted: Thu Jan 04, 2007 4:49 pm
by cybermat
I've found the "Error": The JS doesn't work anymore, when the google-geotag plugin is installed and active.
I disabeld this plugin and all works fine again. I think google changed their JS-Code, that is referenced by the plugin, so that this could happen without any changes from me.

What a pitty, i like that plugin....

Posted: Thu Jan 04, 2007 8:42 pm
by garvinhicking
Hi!

Dang, that'S too bad. :(

Maybe you could contact Zoran about this? I'm sure he'd happily fix that issue?!

Best regards,
Garvin

Posted: Fri Jan 05, 2007 7:56 am
by cybermat
yes, i will do that...

Thanks for your support.

Posted: Fri Jan 05, 2007 3:41 pm
by zoran
I'll sure be happy to fix the issue, once I'll be able to reproduce :)

I've tried in on my s9y 1.1 and geotag 1.17 installation, which works fine. To be sure, I have also removed and reinstalled the plugin using spartacus.

I've also tried it on two s9y 1.0.4 and geotag 1.17 installations (I first upgraded geotag 1.14 to 1.17) with and without wysiwyg-editor, without problems.

Any hints on how to reproduce? Perhaps you could list your other plugins?

Best, Zoran

Posted: Sun Jan 07, 2007 6:04 pm
by cybermat
Now i found the time to answer.

I don't understand this. All on the serendipity-admin-interace works fine, without the geotag-plugin activated. When i activate it, the errors occur and the buttons don't work anymore.

I've tested a little bit, and realized:

When the plugin is activated and i write a new entry, all works fine. Then i choose a location in the geotag-plugin and save the entry. Still all works fine. Then i want to edit the entry, and the buttons don't work anymore. The errors occur when i want to edit an existing entry, not when i create a new one.

Can you reproduce this behaviour?

Posted: Mon Jan 08, 2007 11:23 am
by zoran
I've made a new entry, geotagged it, went to the frontpage, clicked the edit entry link and changed the location using the plugin. saved again, and it still works.

So, I still can't reproduce :(

Perhaps it is a combination with other plugins? What other plugins are you using (that use javascript)?

Best regards, Zoran

Posted: Tue Jan 09, 2007 9:43 am
by cybermat
Hm, that's really strange. Ok, i use this plugins, that take an effect on the edit-frontend (i think):

* Geotag
* Textformatierung: Serendipity
* Textformatierung: NL2BR
* Browser-Kompatibilität
* Freie Artikel-Tags
* Lange Einträge aufteilen
* Sonderzeichen/Erweiterte Buttons für Non-WYSIWYG
* Einträge automatisch sichern

Posted: Tue Jan 09, 2007 7:51 pm
by garvinhicking
Hi!

The "Save entries automagically" plugin is most likely the culprit. It HEAVILY modifies the internal JS routines and onload options. I doubt the geotag and this plugin might coexist peacefully.

Best regards,
Garvin

Posted: Tue Jan 09, 2007 9:36 pm
by cybermat
Ok, i had to remove the autosave plugin, so that the geotag plug works again. Only deactivating it, doesn't help.
Now the geotag plugin works again, but i have to be careful when writing new entries, that my session is still valid. More than one time i lost a complete (and long) entry, when saving it with an expired session....

But nevertheless i had both plugins installed and activated (geotag and autosave), and they worked properly together, and from one day to another, the described errors occured.

But ok, i can rather do without the autosave-, than without the geotag-plugin. Thank you both very much for your support.

mat

Posted: Tue Jan 09, 2007 10:55 pm
by garvinhicking
Hi!

Hm, usually things can't just change when they worked like that exactly before. Did you change your personal browser? Some auto-update maybe installed IE7 for you? ;)

Or maybe you installed new antispy software, some new browser plugins, local proxies...

Geotag and Autosave both heavily deal with JavaScript, so chances are that it's a browser issue if it worked before...

HTH,
Garvin