• Hi There,

    I’ve had a problem upgrading RCP from an old version to the latest version.

    The problem we were having was when people were editing posts, they were accidentally setting them as being restricted.

    The problem lied in the line 53 of core/includes/admin/metabox-view.php

    <option value="registered-users"<?php selected( true, empty( $sub_levels ) && ! is_numeric( $access_level ) && ! empty( $user_role ) && 'All' !== $user_role ); ?>><?php _e( 'Members with a certain role', 'rcp' ); ?></option>

    The problem was that the $user_role variable, based on the rcp_user_level, was set to “None”, meaning that this line was selecting the “Members with a certain role” variable (instead of “Unrestricted”, which was being selected but then deselected). The client was forgetting to change it to unrestricted, and making edited content restricted.

    I’ve had to put a hotfix in of the following:-

    <option value="registered-users"<?php selected( true, empty( $sub_levels ) && ! is_numeric( $access_level ) && ! empty( $user_role ) && 'All' !== $user_role && 'None' !== $user_role ); ?>><?php _e( 'Members with a certain role', 'rcp' ); ?></option>

    But this means that the plugin can’t be updated. Is this a fix you can apply to the plugin? Or is there a better way to fix this (changing “rcp_user_level” to “All” resulted in the content being restricted) – as this is a large site and don’t want to waste time changing all these posts.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support jkleinithemes

    (@jkleinithemes)

    Are you upgrading from an old copy of the free Restrict Content to a new version? Or is this the pro version? What version are you upgrading from and to? We normally do not provide custom code support but your hotfix is interesting.

    Thread Starter Rhys Wynne

    (@rhyswynne)

    Hi there,

    Doing some digging, it wasn’t a huge upgrade (3.2.6 > 3.2.8), however we went from v2 (Legacy) to v3, to use the reCAPTCHA.

    It was the free version.

    Obviously if it’s our setup then that’s totally understandable ?? (I inherited the site), but I cannot imagine why it would be “None”.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem upgrading from an old version to a new version’ is closed to new replies.