#1 January 8, 2016 8:04am

NickS
Member
Registered: September 16, 2014
Posts: 7

Content Alerts Not Saving - 302 Response

On the /admin/users/edit/1/ screens for any user I seem to be unable to save "content alerts" settings. I edit the user and check the boxes, then save, but when I go back to edit they are all unchecked again.

In Chrome Dev tools I see a POST to /admin/users/update/ with a 302 header. (Below but I DELETED some of the session info for safety)

Request URL:http://www.theclevercup.com/admin/users/update/
Request Method:POST
Status Code:302 Found
Remote Address:104.28.26.9:80
Response Headers
view source
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
CF-RAY: DELETED
Connection:keep-alive
Content-Type:text/html; charset=utf-8
Date:Fri, 08 Jan 2016 12:56:17 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Location:http://www.theclevercup.com/admin/users/
Pragma:no-cache
Server:cloudflare-nginx
Transfer-Encoding:chunked
X-Frame-Options:SAMEORIGIN
Request Headers
view source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8,es;q=0.6
Cache-Control:max-age=0
Connection:keep-alive
Content-Length:396
Content-Type:application/x-www-form-urlencoded
Cookie:__cfduid=DELTED; PHPSESSID=DELTED; bigtree_admin[emaiI]=DELTED%40gmail.com; hide_bigtree_bar=; _ga=DELETED ; bigtree_admin[login]=%5B%22session-DELTED%22%2C%22chain-DELTED%22%5D
Host:www.theclevercup.com
Origin:http://www.theclevercup.com
Referer:http://www.theclevercup.com/admin/users/edit/1/
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
Form Data
view source
view URL encoded
id:1
emaiI:DELETED @gmail.com
password:
name:Nicholas
company:Home
daily_digest:on
permissions:{"Page":null,"Module":{"1":"p","2":"p","4":"p","5":"p","6":"p","7":"p","10":"p"},"ModuleGBP":{},"Resource":null}
alerts:{"0":{},"undefined":"on"}


Exploring the database I see this saved into the alerts field for the user

{
    "0": [

    ],
    "undefined": "on"
}

Offline

#2 January 11, 2016 7:18pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Content Alerts Not Saving - 302 Response

Do you see any errors in your Javascript console when clicking the checkboxes for content alerts? The undefined is something that's being set in Javascript prior to form submission. We compile a JSON object to post in Javascript to get around PHP's max post vars issues so if Javascript fails for some reason that kind of thing will happen but I can't replicate it in my local environment.

If you get a JS error can you dump your bigtree_pages table and email it to me (tim@fastspot.com)? It could be something to do with the tree setup. Thanks!

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.