Jump to content

Weekly update – 12 November 2021: Page Autosave + Live Preview


ryan
 Share

Recommended Posts

7 hours ago, wbmnfktr said:

What do you think?

I agree that some sort of on-the-fly option to opt out of autosave would be essential. One option is what you suggest ("PageAutoSave O N L Y when in PreviewMode?") but maybe an on/off switch would be nice to have too (next to the page title or something like that). So I am thinking of not just one way to opt out temporarily but more than one way to suit "all needs".

I do not have the time to test the autosave feature, so I cannot be more specific but the issue you are facing sounds quite reasonable and that is why I commented on it ;)

  • Like 2
Link to comment
Share on other sites

  • 1 year later...
On 11/14/2021 at 10:52 AM, adrian said:

But back to the more important issue of why the module doesn't actually work for me. Firstly, the module does work on my local dev environment, but on a live servers, it doesn't.

I still keep getting: "ajax error: error"

If I inspect the Network tab, I see a 500 error for: /page/edit/?id=8074&modified=1636913850&fields=body but there don't seem to be any PHP errors, so I went looking in the apache logs and I am seeing these:

[Sun Nov 14 09:54:27.525633 2021] [proxy_fcgi:error] [pid 24560:tid 139854520305408] (70007)The timeout specified has expired: [client 154.5.162.190:51384] AH01075: Error dispatching request to : (polling), referer: /?live_preview=1

[Sun Nov 14 09:54:34.477785 2021] [proxy_fcgi:error] [pid 24560:tid 139854579054336] [client 154.5.162.190:51384] malformed header from script 'index.php': Bad header: {"error":false,"message":"Ajax, referer: /page/edit/?id=8074

[Sun Nov 14 09:54:34.477904 2021] [proxy_fcgi:error] [pid 24560:tid 139854579054336] [client 154.5.162.190:51384] AH01070: Error parsing script headers, referer: /page/edit/?id=8074

[Sun Nov 14 09:54:34.477913 2021] [proxy_fcgi:error] [pid 24560:tid 139854579054336] (22)Invalid argument: [client 154.5.162.190:51384] AH01075: Error dispatching request to : , referer: /page/edit/?id=8074

The Network tab shows Response Headers: content-length: 0

I did a a little investigating to see if there are any known issues with SSE and these errors, but nothing useful so far.

 

 

I'm getting the same 500 errors as well in my particular case.  To clarify my situation:

  • occurs on live site (Ubuntu 20.04, Apache 2.4.41, php 7.4.3), but not dev site (Ubuntu 22.04, Apache 2.4.52, php 8.1.2); i mirrored live to dev database as well
  • enable live preview = on (not sse)

While it 500 errors, the field technically does get autosaved (I can refresh the page without hitting the save button and the updated value is still there).

I wonder if the Apache or PHP version matters.  Will have to check.

@adrian Did you ever find a solution to this?

Link to comment
Share on other sites

1 hour ago, adrian said:

Nah sorry, I gave up 🙂

OK I figured it out but don't know the exact reason.  Upgrading from php 7.4.3 to php 8.1 resolved the issue.  I noticed in 7.4.3, the http headers of the request are in lowercase, but in php 8.1, they are in the more proper case.  Also, the headers are listed a little bit differently in 7.4 vs 8.1.  That's probably where the issue is.

Link to comment
Share on other sites

3 minutes ago, Jonathan Lahijani said:

OK I figured it out but don't know the exact reason.  Upgrading from php 7.4.3 to php 8.1 resolved the issue.  I noticed in 7.4.3, the http headers of the request are in lowercase, but in php 8.1, they are in the more proper case.  Also, the headers are listed a little bit differently in 7.4 vs 8.1.  That's probably where the issue is.

Interesting. I am pretty sure I was testing this feature on my local dev which was running 8.1 at the time, but great to hear it's now working for you regardless. I no longer have access to the dev tools support board so I can't test the latest version of the module - maybe there were multiple issues?

Link to comment
Share on other sites

1 minute ago, adrian said:

Interesting. I am pretty sure I was testing this feature on my local dev which was running 8.1 at the time, but great to hear it's now working for you regardless. I no longer have access to the dev tools support board so I can't test the latest version of the module - maybe there were multiple issues?

I should clarify that php 7.4.3 was fpm and php 8.1 was non-fpm.  Not sure if php-fpm played a role.

Link to comment
Share on other sites

  • 4 months later...
On 11/13/2021 at 12:28 AM, ryan said:

Sounds good, those are the boards you are able to view? I've added it to the first one you mentioned (ProFields board)

I was just looking for the Page Autosave and Live Preview module to re-install it in a project, yet I couldn't find it anymore. I probably missed something somewhere. Right?

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...