Forums / Cotonti / Support / [solved] Strange urls after update

tensh
#1 2012-11-21 11:32

Hi;

In admin panel, I get strange url like this whenever I click the link:

admin/config#get;n=edit&o=plug&p=html (should be admin/config?n=edit&o=plug&p=html)

Of course urls then don't work. I updated Siena 0.9.9 to Siena 0.9.11. I updated system files, module files and some plugins (urleditor included).

When I see source, the url is correct. what may be the cause?

Added 2 minutes later:

The url redirection is correct when I turn off ajax.

This post was edited by tensh (2012-12-06 08:56, 11 years ago)
Alex300
#2 2012-11-21 12:13

You see the ajax hash address after the hash (#) sign. Hash addresses are used in AJAX-enabled applications for 2 obvious reasons:

  • To enable bookmarking of AJAXed contents
  • To support browser history buttons in AJAX-enabled applications

See:   http://www.cotonti.com/docs/devel/ajax_helpers#ch2.2

Есть миры, не здесь, там, где небеса горят, и моря засыпают, и реки дремлют; люди сделаны из дыма, а города – из песен. Где-то опасность, где-то несправедливость, даже где-то остыл чай. Идем Эйс, у нас много работы!...
...Sorry for my english...
Бесплатные расширения для Cotonti: https://lily-software.com/free-scripts/
tensh
#3 2012-11-21 14:03

But these urls don't work. I get blank page.

Added 19 minutes later:

#36292 Alex300:

(...) for 2 obvious reasons (...)

 

I bet you feel better now.

Added 2 days later:

You know why you have so little community?

Because of terrible support. Only Trustmaster and some other guys are OK here. Both helpful and not boasting about their skills or knowledge.

This post was edited by tensh (2012-11-23 09:37, 11 years ago)
Kilandor
#4 2012-11-27 08:55

I don't belive for a second the Alex's intention was to be "boasting"

tensh
#5 2012-11-27 19:23

He didn't even try to notice that I mentioned in my post that the urls don't work. As I said, I get a blank page only.

I would like to at least know how I can debug ajax in Cotonti admin panel since I don't really know.

Macik
#6 2012-11-28 08:55

Take it easy. It's a goodwill of developers or users to write something here (even they guessed the problem). 

For you question:

Good way to debug any request (whether it ajax or not) with use of modern IDE (Eclipse, PHPStorm, NetBeans) and any PHP debugger, like xDebug or ZendDebug. It requires some effort to set it up first, but it save time later just setting up breakpoint and get all info and line-by-line execution. 

Both of urls must work:

admin/config#get;n=edit&o=plug&p=html 
admin/config?n=edit&o=plug&p=html

As Alex wrote first variant consider «ajax helpers» use, and in normal flow this link must works fine. 

When you run admin/config#get;n=edit&o=plug&p=html then browser loads common admin/config page then ajaxhelper script (resides in "js/base.js") get hashed-string get;n=edit&o=plug&p=html and then via ajax loads up page with these parameters into main block. That's how it works.

So first of all check your .htaccess (if you use apache) file to  conform actual "sef-urls.htaccess" example file. And check "js/base.js" load Ok.

https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F
tensh
#7 2012-12-05 10:50

The problem is that ajax worked fine in Siena 9.8 before the upgrade, after I upgraded the site to Siena 9.11, it stopped working. :/

When I reload the page with hashed url, it blinks for a while (I can see a loading animation) and then I get a blank page. 

base.js loads fine.
htaccess and settings are set on built-in Cotonti pretty urls.

Added 4 hours later:

Strange thing: when i copied the same site to localhost, the ajax works. 

I noticed that my hosting provider attaches some kind of javascript to the pages. Can this cause errors? But previously, ajax worked fine... Hmmmm.

This post was edited by tensh (2012-12-05 14:52, 11 years ago)
Trustmaster
#8 2012-12-06 06:54

Yes, it might be the cause. Use JavaScript Errors console to see if it produces any relevant errors.

We'd be glad to fix it, but we can't reproduce this bug on our hosts...

May the Source be with you!
tensh
#9 2012-12-06 08:40

I wish there were any errors visible... The standard Chrome tool doesn't show anything. I can't possibly debug it on that hosting environment... ? 

Maybe I will solve it through checking what was the difference between ajax from Siena 0.9.8 and Siena 0.9.11? Was there any difference?

Argh, I'm so upset. Even the Ajax tool that suggests the tags in pageadd form shows that crappy attached javascript code >_< (it's attached to every page after </html> tag)

 

EDIT - it seems like somebody else turned on hit analysis from our hosting provider, without my knowledge. I though that this code was always there but it seems like it appeared not so long ago. So... I think my problem is solved and no investigation is needed.

Thank you for your effort!

This post was edited by tensh (2012-12-06 08:53, 11 years ago)