Forum

Thread tagged as: Question

Content opening in tabs doesn't save first time.

Here's what I'm doing. I need to edit each item in my collection. To make sure I get them all, I go to the edit screen and then open each item on the page in a new tab in Chrome.

When I save the first item, it works. But on saving subsequent items, I have to press Save TWICE in order to get it save. The page refreshes, but there's no "Content Updated" message, and when I check, the content wasn't saved. The change is still there on the screen.

I'm on Chrome 46.0.2490.71 (64-bit).

Here's my diagnostic report:

Perch Runway: 2.8.14, PHP: 5.6.10, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.14), assets (2.8.14), categories (2.8.14), perch_blog (4.6), collection_5 (2.8.14), collection_2 (2.8.14), perch_forms (1.8.3), collection_1 (2.8.14), perch_comments (1.2), perch_members (1.3), perch_podcasts (1.1), perch_backup (1.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_comments', 'perch_blog', //'perch_events', 'perch_forms', 'perch_podcasts', 'perch_members', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /PATH TO/local/perch
PERCH_CORE: /PATH TO/local/perch/core
PERCH_RESFILEPATH: /PATH TO/local/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
Resource folder writeable: Yes
HTTP_HOST: local.capitalmass.org.uk
DOCUMENT_ROOT: /PATH TO/local
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

I guess this is to do with tokens to prevent the same form being submitted multiple times. Just wondered if there's a way round it?

Paul Bell

Paul Bell 0 points

  • 6 years ago

I've found that if I refresh the page before I submit, the save is successful - I assume this is because I then get a fresh "token".

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's CSRF protection. A better approach might be to use the pagination arrows in the bottom right hand corner. Cmd-S to save, the click the 'next' arrow, and repeat.

Ah, I'd never noticed the pagination arrows - I'll look out for them.

My only other thought was whether it's helpful to throw an error so the user knows the content didn't save? Otherwise they could not notice and then experience unexpected results.