Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter cfoster

    (@cfoster)

    Thanks for pointing out the link at the top of the Plugins page as I didn’t know about that either, but it still seems like bad UX to have the “All” category not include MU plugins, so having a dashboard widget prominently display them still seems like a good idea since they are an easy attack vector for Malware.

    This is more a suggestion for WordPress I suppose but: MUPlugins should really have to be manually activated just like regular plugins, even if their “must use” nature prevents them from being disabled.

    Thread Starter cfoster

    (@cfoster)

    At first I thought of just delaying my execution with usleep() but this didn’t help. As such something on *my* thread must be responsible (not a race with another thread) because if it was on another thread it would have executed while mine was asleep.

    So, I got off my lazy butt and traced through the call. 🙂

    When one is saving a post with only Term (category / tag) changes, the post is saved through wp_insert_post() which, yes, does save Terms before triggering the save_post action but the Term data it passes to (ultimately) wp_set_object_terms() is the OLD terms for the post. (Why resave the old data? Dunno.)

    After save_post is triggered here (and my routine has retrieved the post with the old terms still in place), there’s one more call to wp_set_object_terms() (from WP_REST_Posts_Controller) that has a the new terms data in it. So it really is storing this data after the save_post has been triggered (but my lazy has now returned and I can’t be bothered to figure out why the controller is doing it this way).

    SOLUTION
    Regardless, tracing through it all I stumbled on rest_after_insert_post which fires only when ALL the data is saved. Yay!

    • This reply was modified 2 years, 5 months ago by cfoster.
    Thread Starter cfoster

    (@cfoster)

    Ah. So you *removed* the backup module in favour of a different plugin.
    Well, that’s definitely stopped it from backing up every hour.
    🙂

    Thread Starter cfoster

    (@cfoster)

    Hi Prashat,
    I don’t usually do updates to the live site, but our next maintenance cycle is in a few weeks and I’ll be sure to test and update you then.
    Thanks,
    Colin

    Thread Starter cfoster

    (@cfoster)

    I’m not sure if the web host made a change after my support request but I can now take out our WP_TEMP_DIR setting and updates work fine without it. I guess we’ll see if the problem returns.

    I can see that get_temp_dir() does use the sys_get_temp_dir() (/tmp) even if upload_tmp_dir has been set. Maybe there was a weird setting like /tmp was writable by us, but not readable? Or perhaps the update files were being downloaded to the directory specified by upload_tmp_dir but trying to be read from sys_get_temp_dir()?

    I guess we won’t know for sure unless the “can’t find file” problem problem returns.

    Thanks,
    -Colin

    Thread Starter cfoster

    (@cfoster)

    Thanks Samuel,

    Sorry, I should have walked through get_temp_dir() before posting. (I expected it to be harder to work how these values are set in WordPress’s internals than it was. 🙂 )

    I’m not sure why I’m seeing a different behaviour at our web host. It seems like defining WP_TEMP_DIR the way we have should have no effect at all, yet we can’t update without it. I’ll put in some logging to figure out what’s going on (and report back if there’s anything interesting).

    -Colin

    This problem just sucked away a few hours of my life. In hopes of sparing others: if you click within the 20 pixels on right edge of the blue bar you can edit the category (etc.).

    I tried using wordpress with
    Windows IE6
    Windows Firefox 1.5
    Mac Firefox 2.0
    Mac Safari 2.0

    and none of them showed any indicators to suggest the right 20 pixels are any different than the rest of the blue bar (which just reorganizes the post options).

    WordPress, dudes: I *love* your product. It’s incredible, really! But… an icon… or something, please. 🙂

Viewing 7 replies - 1 through 7 (of 7 total)