• Resolved aparentdesign

    (@aparentdesign)


    Testing the latest update in a sandbox. WordPress version 6.8.3 with PHP 8.2. Our user with role EDITOR attempted to edit widget text (not changing the conditional code which they cannot access with editor role anyhow) but the conditional content is_single(207) got wiped out. When a user with role ADMIN adds the conditional code is_single(207) back in, nothing happens. The post does not show the widget.

    This settings wiping issue happened with past updates and was fixed, hopefully this can be addressed asap along with a user-friendly approach to posts that doesn’t involve php. thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Mej de Castro

    (@mej)

    Hi @aparentdesign,

    Thanks for reaching out to our support threads. Could you please try adding this filters to your functions.php file or any suitable place?

    function add_extra_hooks( $allowed_functions ) {
    $allowed_functions[] = 'is_single';
    return $allowed_functions;
    }
    add_filter( 'widgetopts_allowed_php_functions', 'add_extra_hooks' );

    Please let us know if the filters resolves the issue. We look forward to your response!

    Kind Regards,
    Mej, WIdget Options Team

    Plugin Author Mej de Castro

    (@mej)

    Hey @aparentdesign,

    Just a quick bump here. Could you please let us know if the filter provided above helps? Thanks!

    Thread Starter aparentdesign

    (@aparentdesign)

    Thx @mej, I have not put in the script yet since the function works for widgets that have not been edited. Unless your plugin update has blocked that script specifically and the other widgets are cached? Seems odd.

    Thread Starter aparentdesign

    (@aparentdesign)

    @mej I implemented the function, resaved the problem widget, cleared cache, and viewed in a fresh browser. The widget does not dispay on the intended page. Other widgets that have not been edited seem ok.

    Again this is something that happened on a previous update and was fixed at one point. Non admins should be able to edit widgets even if they are not accessing or trying to change conditional logic.

    Plugin Author Mej de Castro

    (@mej)

    Hi @aparentdesign,

    Upon further testing with the User Role Editor and the Widget Options plugin, it appears that non-admin users modified by the User Role Editor are still able to edit widgets. Could you please let us know which specific Widget Options features you’re using with non-admin roles so we can run the same tests on our end? Thanks!

    Thread Starter aparentdesign

    (@aparentdesign)

    Are they able to edit widgets without wiping out conditional code? And is an admin able to add the code back in successfully?

    Plugin Author Mej de Castro

    (@mej)

    Hi @aparentdesign,

    Yes, upon further testing, non-admin users modified through the User Role Editor can still edit widgets, and administrators can still add conditional logic codes.

    To help us replicate the issues you’re experiencing, could you please provide a detailed workflow or the exact steps you’re taking on your end?

    Thanks!

    Thread Starter aparentdesign

    (@aparentdesign)

    Hi @mej , to reiterate, the user edited a widget. This wiped out the conditional code, and when the admin put it back, it no longer worked.

    Is there some setup in User Role Editor that we need to apply to work with your plugin? Which setting to allow?

    Plugin Author Mej de Castro

    (@mej)

    Hi @aparentdesign,

    Thanks for the clarification. I’ve created a video reference demonstrating the behavior when a non-admin user—modified with the User Role Editor—edits a widget. In our tests, the non-admin user does not wipe or remove the Conditional Code that was previously added and saved by an Administrator.

    In the screen recording, we were regrettably unable to replicate the issue you described regarding the Conditional Logic tab being cleared. Could you please confirm if we followed the same workflow you used when the issue occurred? Any additional steps or details will help us reproduce the problem accurately on our end.

    Screen Record link here: https://streamable.com/o6rq4r

    The conditional logic used is is_category() && !is_page(), where the widget only shows on post categories, which is working fine as expected. Please note that we also tested this on classic widgets and it is producing the same output.

    Thanks, and we look forward to your response.

    Kind Regards,
    Mej, Widget Options Team

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

The topic ‘Widget Options Version 4.1.3’ is closed to new replies.