Jump to content

saving ..sometimes, and nothing in errors.txt


joe_g
 Share

Recommended Posts

Hey there,

I run into a strange problem with a live site that's been running okay for quite some time. I installed sury so it runs the latest php always (this was before debian shipped with php 8). So the only thing that could have changed is the php version... I think. Its on php 8.3.13 and PW 3.0.229.

Anyway, if i create a page with some text field it saves ..sometimes. On average every second time. I press save and the page reloads, but then sometimes without the latest update. There is nothing in the PW error log, nothing in the apache error log, also no console errors.

To make things weirder, I have another test version of the same site running on the same server and that one is working great. So it might actually be that something is up with this particular install...

I'm totally stumped. If you got any ideas i'd love to hear them!

 

Link to comment
Share on other sites

I have no idea but in that case I would start by:

1. Activating debug mode.
2. If you have TracyDebugger go to ProcessWire info Pannel >  Clear Session, Cookies, & Modules Refresh. If you don't, install it 😉
3. Just for the sake of it Clear all your caches
4. Log what's happening when the page is saved:

Put this in your ready.php

$this->addHookBefore('Pages::save', function (HookEvent $event) {
    $page = $event->arguments(0);
    bd("Attempting to save: {$page->title}");
});

$this->addHookAfter('Pages::save', function (HookEvent $event) {
    $page = $event->arguments(0);
    bd("Saved: $page->title");
});

$this->addHookBefore('Pages::saved', function (HookEvent $event) {
    $page = $event->arguments(0);
    $changes = $event->arguments(1);
    bd($changes, "Changes on $page->title");
});

Check the Dumps:

931280166_Screenshot2024-10-3109_19_45.png.2f691189d88b8a67af07660a7c34ea14.png

 

 

 

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...