Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid security token; please reload the page and try again" only when saving theme settings #1245

Closed
patriclougheed opened this issue Jan 12, 2017 · 8 comments
Assignees

Comments

@patriclougheed
Copy link

Got Grav running great in my Linux, PHP7, Nginx space and can do everything fine except save theme settings. Just updated to latest build and all plugins as well with no change. Double checked file permissions as well. Using Grav v1.1.12 and Admin v1.2.7

Using Nginx conf supplied and no errors being logged.

Turned debug on and attached results.

grav_debug.txt

@rhukster
Copy link
Member

@mahagr looks like a gantry5 issue?

@patriclougheed
Copy link
Author

My bad... I now see that the appearance menu is specific to gantry themes.

@mahagr
Copy link
Member

mahagr commented Jan 13, 2017

Same as gantry/gantry5#1748

I'm really not sure what could cause this to fail in Nginx as we just call

    $nonce = Utils::getNonce('gantry-admin');

and

protected function checkSecurityToken()
{
    /** @var Request $request */
    $request = $this->container['request'];
    $nonce = $request->get->get('nonce');
    return isset($nonce) && Utils::verifyNonce($nonce, 'gantry-admin');
}

@flaviocopes
Copy link
Contributor

flaviocopes commented Jan 13, 2017

Same as getgrav/grav-plugin-admin#893 using g5_hydrogren

@flaviocopes
Copy link
Contributor

flaviocopes commented Jan 13, 2017

screen shot 2017-01-13 at 10 49 41
Replicated

@mahagr
Copy link
Member

mahagr commented Jan 13, 2017

Please update nginx.conf:

    location / {
        try_files $uri $uri/ /index.php?_url=$uri&$query_string;
    }

@mahagr mahagr closed this as completed Jan 13, 2017
@patriclougheed
Copy link
Author

Works like a charm now! Thanks

robgnu added a commit to robgnu/grav-plugin-subscriber that referenced this issue Jan 22, 2017
This plugin was affected by
[nginx config bug](getgrav/grav#1245).
This is solved now.
@regalstreak
Copy link

Not nginx.conf but well the configuration of the site in sites-available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants