eZ Community » Forums » General » Problem with admin redirections
expandshrink

Problem with admin redirections

Problem with admin redirections

Friday 28 September 2012 5:57:16 am - 26 replies

Hi All,

I have a problem with my admin area redirecting to something like the following every time I clear cache or after doing things like show/hide from the context menu:

http://www.mysite.com/site_admin/content/treemenu/91/1348803553/1348800169/d7aadf5cd2b9595ddf97801795ae22b8

The page displays the JSON encoded content for the treemenu...

This issue has only just started after I just did a massively overdue upgrade from eZPublish 3.8.7 to 2012-8 (wasn't easy I can tell you)...

Anyone know what might be causing this or any idea of where I should start looking?

Cheers
Nathan.

Modified on Friday 28 September 2012 5:59:40 am by Nathan Kelly

Wednesday 31 October 2012 10:53:35 am

@Nathan: Are you sure your rewrite rule is taken into account ? Is it in a virtual host ? You said above that you took your rewrite rules from .htaccess_root, but these ones are only meant to be run from a .htaccess file. If you want a real virtual host example, check in doc/examples/ezpublish.conf.

@Mavko: /layout/set module is NOT meant to do such things. Use eZJSCore instead, which is specifically designed for this kind of things blunk.gif Emoticon. However, if you develop custom modules with AJAX purpose, just add ajax as ui_context in your module.php:

$ViewList['myajaxview'] = array(
    'ui_context' => 'ajax',
    'script' => 'myajaxview.php'
);

Wednesday 31 October 2012 3:09:37 pm

My instance is working fine now.

Anyway my problem was some kind of different.

Redirects worked find with me, but i've gotten JSON-output on calling something like /setup/cache in the backend.
It also appeared on URIs as /content/view/full/2 though.

Had to set the browsercache for it to 0, since the browsercache of Opera, Chrome and Firefox went berserk and displayed old results from cache.

@all having the same problem:
Try replacing "define( 'MAX_AGE', 86400 );" with "define( 'MAX_AGE', 0 );" and check out if it works.
"define( 'MAX_AGE', 86400 );" you can find in some files.
Its quiet a hotfix,... though it helped in my case.

In addition i added the changes from git Jérôme just pushed.

Wednesday 31 October 2012 10:05:23 pm

Quote from Jérôme Vieilledent :

@Nathan: Are you sure your rewrite rule is taken into account ? Is it in a virtual host ? You said above that you took your rewrite rules from .htaccess_root, but these ones are only meant to be run from a .htaccess file. If you want a real virtual host example, check in doc/examples/ezpublish.conf.

Jérôme,

I tested this and it seems you are correct, adding the rewrite rule has no effect when using .htaccess, the issue seems to be solved when running in virtual host mode, thanks for the tip.

Cheers
Nathan.

Wednesday 14 November 2012 11:51:35 pm

Quote from Jérôme Vieilledent :

@Mavko: /layout/set module is NOT meant to do such things. Use eZJSCore instead, which is specifically designed for this kind of things blunk.gif Emoticon. However, if you develop custom modules with AJAX purpose, just add ajax as ui_context in your module.php:

$ViewList['myajaxview'] = array(
    'ui_context' => 'ajax',
    'script' => 'myajaxview.php'
);

Jerome... There are some situations where using ajax layout is a better solution than using eZJSCore.

But event without starting that discussion, what about print or popup layout?

Imagine this scenario:

  • user opens an article page
  • clicks on the print button which opens the page in print layout in a popup window
  • (after this the layout/set/print... url is remembered as last access uri)
  • user closes the popup window (the last access uri is now still layot/set/print...)
  • user goes to log in
  • after the login user is redirected to the last access uri...

And there you are, after login user gets displayed the print layout of the article, stuck with no navigation or links to go back to the site. Usability failed...

This is just one example, we could find many more that prove that we need to have a mechanism to disable last access uri remembering for some layouts.

Try to think outside of the box...

Thursday 20 August 2015 7:55:43 am

The problem is still not resolved sad.gif Emoticon

 
{"error_code":0,"node_id":"43","children_count":3,"children":[{"node_id":52,"object_id":50,"class_id":1,"has_children":false,"name":"Files","url":"\/arhat_admin\/Media\/Files","modified_subnode":1081860720,"languages":["rus-RU"],"is_hidden":false,"is_invisible":false},{"node_id":51,"object_id":49,"class_id":1,"has_children":true,"name":"Images","url":"\/arhat_admin\/Media\/Images","modified_subnode":1439632138,"languages":["rus-RU"],"is_hidden":false,"is_invisible":false},{"node_id":53,"object_id":51,"class_id":1,"has_children":false,"name":"Multimedia","url":"\/arhat_admin\/Media\/Multimedia","modified_subnode":1081860720,"languages":["rus-RU"],"is_hidden":false,"is_invisible":false}]}

Community Project 2014.11 (Community Project 2014.11)

PHP Version 5.3.29-1~dotdeb.0

Hosting system: Parallels Plesk 12.0.18, Safe mode disabled
-----

Core, date, ereg, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, dba, dom, hash, fileinfo, filter, ftp, gettext, SPL, iconv, json, mbstring, session, apc, posix, Reflection, standard, shmop, SimpleXML, soap, sockets, exif, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, mysqlnd, apache2handler, Phar, curl, gd, geoip, imap, intl, mcrypt, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, SQLite, sqlite3, suhosin, xsl, mhash, ionCube Loader

-----

A similar problem in versions 4.3.0 (4.3.0) and Community Project 2012.6 (Community Project 2012.6)

 Repeated requests to the server returns an error that there is no! 

************************NORMAL RESPONSE************************

83.69.129.98 - - [12/Aug/2015:11:05:48 +0500] "GET /admin/Stat-i HTTP/1.0" 200 129984 "http://site.com/admin/Katalog" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36 OPR/30.0.1835.125"

Remote Address:83.69.129.17:80
Request URL:http://site.com/admin/Stat-i
Request Method:GET
Status Code:200 OK

Response Headers

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 12 Aug 2015 06:05:48 GMT

Content-Type: text/html; charset=utf-8 (!)

Transfer-Encoding: chunked
Connection: keep-alive
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Last-Modified: Wed, 12 Aug 2015 06:05:48 GMT

X-Powered-By: eZ Publish

Served-by: site.com
Content-language: ru-RU
Set-Cookie: is_logged_in=true; path=/
Etag: 14
X-Powered-By: PleskLin

Request Headers

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, lzma, sdch
Accept-Language:ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
Cache-Control:no-cache
Connection:keep-alive

Cookie:eZSESSID1b192ac6d91de9c98b0c1624056e2801=80mpg18j2uqb591739lr3n39q7; eZSESSID=6oa09h3b5icive5gnd5pf5gmm7; contentStructureMenu=2/63/78/1012/1013/76/77; is_logged_in=true

Host:site.com
Pragma:no-cache
Referer:http://site.com/admin/Katalog
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36 OPR/30.0.1835.125 

*************************** BAD RESPONSE *****************************

83.69.129.98 - - [12/Aug/2015:10:55:47 +0500] "GET /admin/Stat-i HTTP/1.0" 200 1420 "http://site.com/admin/Katalog" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36 OPR/30.0.1835.125"

Remote Address:83.69.129.17:80
Request URL:http://site.com/admin/Stat-i
Request Method:GET
Status Code:200 OK

Response Headers

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 12 Aug 2015 05:55:47 GMT

Content-Type: application/json

Content-Length: 1059
Connection: keep-alive
Last-Modified: Tue, 04 Aug 2015 05:37:56 GMT
Expires: Thu, 13 Aug 2015 05:51:07 GMT
Cache-Control: max-age=86400
Pragma:

X-Powered-By: PleskLin

Served-by: site.com
Content-language: ru-RU
Age: 280

Request Headers

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, lzma, sdch
Accept-Language:ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
Connection:keep-alive
Cookie:eZSESSID1b192ac6d91de9c98b0c1624056e2801=80mpg18j2uqb591739lr3n39q7; eZSESSID=6oa09h3b5icive5gnd5pf5gmm7; is_logged_in=true; contentStructureMenu=2/63/78/62/1012/1013/76/77/83

Host:site.com
If-Modified-Since:Wed, 12 Aug 2015 05:49:16 GMT
If-None-Match:14
Referer:http://site.com/admin/Katalog

User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36 OPR/30.0.1835.125

Modified on Thursday 20 August 2015 11:28:29 am by Maxim Kopytov

Friday 13 November 2015 6:02:54 am

The problem disappeared after the Apache modules mod_cache, mod_mem_cache have been disabled!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from