Skip to:
Content
Pages
Categories
Search
Top
Bottom

Oops! That page can’t be found on Sub Forums with WordPress 4.4


  • KPDub
    Participant

    @kpdub

    Updated to WP 4.4 and sub forums are no longer accessible, getting the Ooops….message

    Tried deactivating all plugins, using a default template and still get the same error.

    IF I go into dashboard I can actually get to the topics from the backend, but its of no use to my site members

    Have asked for my hosting company to reinstall a backup from last 24 hours as my backup failed

    MODERATOR EDIT :

    There is a SUMMARY of this issue and what to do at the end of this thread (or near it) – to save newcomers having to read the whole thread

Viewing 25 replies - 51 through 75 (of 76 total)

  • KPDub
    Participant

    @kpdub

    Little bit confused here.

    Does anyone know that if you upgrade back to 4.4 then do the steps above (changing forum / sub forum from public to private and saving inbetween) that it all works now?


    Robin W
    Moderator

    @robin-w

    As far as I know for those that are affected (and that’s only a subset who have hidden/private sub forums I believe – although let me know if different, the it is either

    a. If you are staying with 4.4 then implement the following
    open wp-includes/post.php, scroll to about line 4300 to find function get_page_uri( $page )
    In that function replace

    if ( 'publish' === $parent->post_status ) {
    

    with

    if ( ! in_array( $parent->post_status, get_post_stati( array( 'internal' => true ) ) ) ){
    

    But this doesn’t seem to work for everyone or

    b. Revert to 4.3 and then for each forum affected change the status from private/hidden to public, save and then change back to how you want it and save. That should be all you need to do. The private groups toggle is a red herring as far as I can work out

    Robin wrote…

    As far as I know for those that are affected (and that’s only a subset who have hidden/private sub forums I believe

    This is correct

    Robin wrote…
    But this doesn’t seem to work for everyone or

    It should work for everyone, if it doesn’t work for you please add a note to this thread letting me know it doesn’t please 🙂

    ————————————————————

    The root cause of the issue is hierarchal post URL’s with custom post statuses, so in bbPress case if we have a “private” forum that uses a custom post status “private”, as such when we expect our URL to be e.g.: https://example.com/forums/forum/my-private-or-hidden-category/my-forum

    If the forum or category my-private-or-hidden-category is private or hidden then the URL generated for the my-forum excludes the my-private-or-hidden-category part of the URL and the resulting url is https://example.com/forums/forum/my-forum which is incorrect, bad and makes us sad 🙁


    bsilverop
    Participant

    @bsilverop

    So does this change just get rolled in to the next version of WordPress? My hosting provider (GoDaddy) wont allow me to change this file as it is a “core” WordPress file, nor can they roll back without rolling the whole site back to the way it was before the update. They have no exception process that allows me to update the file, so I imagine that means I wont be able to fix this until the next version of WordPress is released?

    @bsilverop I’ve asked a couple of people for there feedback:

    A suggestion was that you could send the following link to GoDaddy that explains the cause of the issue and the fix that will ship as part of WordPress 4.4.1, maybe they’d be prepared to then consider allowing this:

    https://core.trac.wordpress.org/ticket/35084

    Further, you could take a backup of your current database in its current state, roll back the site to the last 4.3.x version backup you have, then merge in the database changes for the backup you just made. This of course is easier said than done and is far from the easiest of tasks unless you are proficient in MySQL 😉

    The 3rd option was to switch to a host that allows some flexibility 😉

    I’ll try to get an update from the WordPress Core folks on an approximate timeline of when WordPress 4.4 will ship and post that back here once I know.


    mglasser
    Participant

    @mglasser

    Just curious what specifically changed to cause this problem. I upgraded to 4.4 and then reverted back to 4.3.1 and I think this caused my problem. Was this new logic in a new php file or a change to an existing file? Or did the upgrade make some change in the database? I have learned that my host WPEngine does a non-destructive restore, so when I restored to revert back to 4.3.1 it did not remove the wp_termmeta table nor any new files that were added. But it should have reverted back any changes to existing files which would be calling this new code. My site is working now, but I am still curious how this happened so I can better understand how I should revert back to previous versions.

    @mglasser The specifics of the cause are outlined in my post above

    Oops! That page can’t be found on Sub Forums with WordPress 4.4

    I upgraded to 4.4 and then reverted back to 4.3.1 and I think this caused my problem.

    Try resaving the forum status, i.e. switch it to public, then back to private

    Was this new logic in a new php file or a change to an existing file? Or did the upgrade make some change in the database?

    See my link above also

    I have learned that my host WPEngine does a non-destructive restore, so when I restored to revert back to 4.3.1 it did not remove the wp_termmeta table nor any new files that were added. But it should have reverted back any changes to existing files which would be calling this new code. My site is working now, but I am still curious how this happened so I can better understand how I should revert back to previous versions.

    You should probably raise those concerns with WPEngine, there would be pros and cons of removing the wp_termmeta table but I’d say it isn’t removed because its a “non destructive” restore, and yes the files reverted back would fix the issue, WPEngine should be able to confirm all of this for you.


    bsilverop
    Participant

    @bsilverop

    Thanks Stephen, I appreciate the feedback. All great suggestions. Unfortunately GoDaddy has made it clear that they will absolutely never update a core WordPress file, nor can they roll back an update even if I wanted to restore the DB on top of a rolled back version. I’ll have to wait for the next release or make my forums public in the mean time.


    Robin W
    Moderator

    @robin-w

    @bsilverop – do you not have FTP access with GoDaddy?


    shades404
    Participant

    @shades404

    @robin-w: did you receive my mail?


    Robin W
    Moderator

    @robin-w

    I have just sent your a reply.

    It does seem that the fix in wp-includes/post.php doesnlt work for everyone – I donl;t know why, and you could spend hours investigating whether it is theme/plugin/user related.

    For the time being 3 suggestions hold.

    Un-nest your forums, so that you don’t have private/hidden sub forums
    Apply the fix and see if it works for you
    revert to 4.3

    None is a better solution than the other – it depends on your circumstances. If you can live with un-nesting, then this is the simplest !


    shades404
    Participant

    @shades404

    My findings (I mailed those also to @robin-w – but again – I dont think that his plugin is causing and problems)

    • I restored my test site back to 4.3.1
    • Added some topics and replays to subforums (nested forums)
    • Then upgraded to 4.4
    • After I refreshed the logged in user there seems to be no difference at first
    • This is the link : http://(my_test_site)/forums/topic/new-topic-in-4-3-1-in-subforum
    • /#post-288 (Located in home › Forums › Website › Site Suggestions)

    • Clicking on “Site suggestions” gives oops – page cannot be found
    • Clicking on “Website” gives me a list of availables forums (which is as it was in 4.3.1)
    • Clicking Forums > NotNestedForum (which is not nested ofc) still gives me access to topics. Adding a reply to it also does work. Also does added a new topic.
    • Any nested forum is still unreachable but when I go directly to #post-288 which is in subforum wp4.4 doesnt complain. I am able to reply to that topic. *But creating new topics doesnt work ofc*

    So

    • Going to apply the fix : if ( ! in_array( $parent->post_status, get_post_stati( array( ‘internal’ => true ) ) ) ) *does not work* so i reverted it back
    • Toggling the rights from forums and users : doesnt work
    • Going to apply the fix again : if ( ! in_array( $parent->post_status, get_post_stati( array( ‘internal’ => true ) ) ) ) *Still doesnt work*

    Oke, what now…

    • Unnest a forum (parent = root) oh yeah that works…
    • Nest it again.. Again not accessible.

    Since I made some changes with togglings rights and moving nested forums to the “root” of the forums I decided to restore my testsite once more and directy move a nested forum to the “root”

    • ye – moving them to the top of the forumlist (unnest) is all I needed to do basically – sure there is a bug tho but the suggested fix is not a solid fix

    The fix didn’t fix anything in my situation – I have no clue if the “bbp private groups” plugin has anything the do with it (to be fair – I think it does not) but reverting back to 4.3.1 is a *bad* idea. If you must restore and backup prior to your upgrade otherwise just stick to 4.4 and unnest the forums for now.


    bsilverop
    Participant

    @bsilverop

    @robin-w, I have FTP access but GoDaddy only gives read access to core files. This is their “Managed WordPress” account. It’s optimized for speed with a caching proxy designed for WordPress and is faster than a regular hosting account. One of the few drawbacks I suppose.


    Robin W
    Moderator

    @robin-w

    Thanks for explaining that – now I understand !

    There is a new fix, rather an alternate that better detects and reflects the root cause of the issue:

    Replace if ( 'publish' === $parent->post_status ) { with if ( ! empty( $parent ) ) {

    The full details can be viewed in the WordPress ticket:
    https://core.trac.wordpress.org/ticket/35084

    And the latest patch:
    https://core.trac.wordpress.org/attachment/ticket/35084/35084.5.diff

    Also please refrain from email, the bbPress team can only respond to issues we can read here in the public forums or our bug tracking and reporting system. If the current fix here is not working for you please add that here with as much detail as you can so that we can try and configure our forum configuration to match yours and reproduce the issue.


    Robin W
    Moderator

    @robin-w

    SUMMARY OF ISSUE AND TEMPORARY FIXES

    So summary to save people needing to read this whole thread

    There is an issue with WordPress 4.4 and bbpress which should (hopefully) be fixed by WordPress 4.4.1 when it is released.

    The issue only affects sub forums that are private or hidden, when you will get a 404 error as the url cannot be correctly interpreted.

    For those interested:

    The root cause of the issue is hierarchal post URL’s with custom post statuses, so in bbPress case if we have a “private” forum that uses a custom post status “private”, as such when we expect our URL to be e.g.: https://example.com/forums/forum/my-private-or-hidden-category/my-forum

    If the forum or category my-private-or-hidden-category is private or hidden then the URL generated for the my-forum excludes the my-private-or-hidden-category part of the URL and the resulting url is https://example.com/forums/forum/my-forum which is incorrect, bad and makes us sad

    To fix in the meantime you have 4 choices

    either
    a. Stay with 4.4 then implement the following
    open wp-includes/post.php, scroll to about line 4300 to find function get_page_uri( $page )
    In that function replace

    if ( 'publish' === $parent->post_status ) {
    
    

    with

    if ( ! empty( $parent ) ) {
    

    If you try this, please advise if this doesn’t fix for you.
    or
    b. Change your sub forums to main forums – it is only sub forums that are affected
    or
    c. In theory you could just make your private forums public, but suspect you have them private for a reason !
    or
    d. Revert to 4.3 and then for each forum affected change the status from private/hidden to public, save and then change back to how you want it and save.

    UNofficial info: release candidate WP 4.4.1 expected first week of January. Let’s hope !

    WordPress 4.4.1 RC (Release Candidate) was released earlier today, if your able to test it and make sure this issue is resolved that would be great 🙂

    4.4.1 Release Candidate

    Expect the main 4.4.1 release to be released later this week pending the RC release testing.

    4.4.1 Production automatically received and installed. Let’s hope no new issues arise !
    Pascal.

    WordPress 4.4.1 has now been released, could you please test to make sure this issue is resolved. https://wordpress.org/news/2016/01/wordpress-4-4-1-security-and-maintenance-release/

    Thanks for all your feedback and patience here in this topic, its greatly appreciated everyone 🙂


    totosky
    Participant

    @totosky

    Hey,

    I applied the new release of wordpress and I still have the same issues. Some (all?) subforums can’t be browsed, some subjects can’t be read (I still have the same message: “only members could read this subject”, but I logged in with my correct password).
    If I logged in as an administrator, everything is fine and I can browse every subjects and subforums.

    I applied the correction : if ( ! empty( $parent ) ) {
    but it’s still the same issues.

    Thanks by advance


    Robin W
    Moderator

    @robin-w

    Do you still have a problem?


    bsilverop
    Participant

    @bsilverop

    This seems to be working well for me now that the update has been rolled out to my site. I’ll continue testing but looks good so far. Thanks for all who were involved in investigating/fixing this problem!


    goatherdtoo
    Participant

    @goatherdtoo

    Well I have 4.4.1 installed and BBPress and cannot post new topic because I have to have Plain links instead of date and name links…. so I either can’t post topics or see my front page!
    ANY SUGGESTIONS ANYONE?
    It’s driving me mad……Help!
    What’s the point of a forum if you can’t post….?


    Pascal Casier
    Moderator

    @casiepa

    Hi,
    You tried to switch to different permalinks settings, save it, then switch back to the settings you wanted and save again ?

    If you did, then I suspect a plugin conflict somewhere. Try to disable all other plugins and switch to a default theme, then reactivate one after the other.

    Pascal.

Viewing 25 replies - 51 through 75 (of 76 total)
  • You must be logged in to reply to this topic.
Skip to toolbar