• Resolved eevan79

    (@eevan79)


    Hello,

    thanks for nice plugin. However, I noticed a few problems.

    1. When editing an individual page, data is not saved (for page restriction). And are also the data is resetand all fields are empty, when the page is saved.

    https://i.ibb.co/mq0Bcbh/Untitled-2.jpg

    Lock by products – no products are displayed

    Only checkboxes are saved

    2. why is there no redirection to the product? When a page is locked, simply redirect to the product that unlocks that page.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter eevan79

    (@eevan79)

    Regarding the first problem, it seems that there is a conflict with another plugin. During testing, I found out that the additional blocks plugin is causing a problem and the data is not being saved. Also, if the classic editor is active, the data will not be saved.

    Plugin Author Vlado Grcic

    (@vladogrcic)

    1. Whats the plugin? Do you you mean when you have classic editor enabled and add the data to the right meta boxes in the editor?
    2. Technical reasons. What if there are multiple? I might have a solution for this but would require coding which currently I’m not able to do. Besides you could just add the product page as the redirect page.
    Plugin Author Vlado Grcic

    (@vladogrcic)

    Also if you could check debug log for errors.

    Thread Starter eevan79

    (@eevan79)

    Plugins that may have conflicts: Ultimate Blocks, Spectre. The classic editor definitely has a conflict, it’s enough that it’s installed and active (it doesn’t have to be used in post or pages).

    Thread Starter eevan79

    (@eevan79)

    I produced error logs on the localhost:

    Stack trace:
    1. {main}() C:\wamp64\www\webtest\wp-admin\post.php:0
    2. require() C:\wamp64\www\webtest\wp-admin\post.php:187
    3. the_block_editor_meta_boxes() C:\wamp64\www\webtest\wp-admin\edit-form-blocks.php:316
    4. do_meta_boxes() C:\wamp64\www\webtest\wp-admin\includes\post.php:2267
    5. PageRestrictForWooCommerce\Includes\Admin\Classic_Metabox_Main->display_metabox() C:\wamp64\www\webtest\wp-admin\includes\template.php:1445
    6. include_once() C:\wamp64\www\webtest\wp-content\plugins\page-restrict-for-woocommerce\includes\admin\class-classic-metabox-main.php:63
    Warning:  count(): Parameter must be an array or an object that implements Countable in C:\wamp64\www\webtest\wp-content\plugins\page-restrict-for-woocommerce\admin\partials\page-edit-classic-metabox.php on line 59
    Stack trace:
      1. {main}() C:\wamp64\www\webtest\wp-admin\post.php:0
      2. require() C:\wamp64\www\webtest\wp-admin\post.php:187
      3. the_block_editor_meta_boxes() C:\wamp64\www\webtest\wp-admin\edit-form-blocks.php:316
      4. do_meta_boxes() C:\wamp64\www\webtest\wp-admin\includes\post.php:2267
      5. PageRestrictForWooCommerce\Includes\Admin\Classic_Metabox_Main->display_metabox() C:\wamp64\www\webtest\wp-admin\includes\template.php:1445
      6. include_once() C:\wamp64\www\webtest\wp-content\plugins\page-restrict-for-woocommerce\includes\admin\class-classic-metabox-main.php:63
    Warning:  Invalid argument supplied for foreach() in C:\wamp64\www\webtest\wp-content\plugins\page-restrict-for-woocommerce\admin\partials\page-edit-classic-metabox.php on line 83
    Stack trace:
      1. {main}() C:\wamp64\www\webtest\wp-admin\post.php:0
      2. require() C:\wamp64\www\webtest\wp-admin\post.php:187
      3. the_block_editor_meta_boxes() C:\wamp64\www\webtest\wp-admin\edit-form-blocks.php:316
      4. do_meta_boxes() C:\wamp64\www\webtest\wp-admin\includes\post.php:2267
      5. PageRestrictForWooCommerce\Includes\Admin\Classic_Metabox_Main->display_metabox() C:\wamp64\www\webtest\wp-admin\includes\template.php:1445
      6. include_once() C:\wamp64\www\webtest\wp-content\plugins\page-restrict-for-woocommerce\includes\admin\class-classic-metabox-main.php:63
    Warning:  Invalid argument supplied for foreach() in C:\wamp64\www\webtest\wp-content\plugins\page-restrict-for-woocommerce\admin\partials\page-edit-classic-metabox.php on line 114
    Stack trace:
      1. {main}() C:\wamp64\www\webtest\wp-admin\post.php:0
      2. require() C:\wamp64\www\webtest\wp-admin\post.php:187
      3. the_block_editor_meta_boxes() C:\wamp64\www\webtest\wp-admin\edit-form-blocks.php:316
      4. do_meta_boxes() C:\wamp64\www\webtest\wp-admin\includes\post.php:2267
      5. PageRestrictForWooCommerce\Includes\Admin\Classic_Metabox_Main->display_metabox() C:\wamp64\www\webtest\wp-admin\includes\template.php:1445
      6. include_once() C:\wamp64\www\webtest\wp-content\plugins\page-restrict-for-woocommerce\includes\admin\class-classic-metabox-main.php:63
    Warning:  Invalid argument supplied for foreach() in C:\wamp64\www\webtest\wp-content\plugins\page-restrict-for-woocommerce\admin\partials\page-edit-classic-metabox.php on line 149
    
    Stack trace:
      1. {main}() C:\wamp64\www\webtest\wp-admin\post.php:0
      2. require() C:\wamp64\www\webtest\wp-admin\post.php:187
      3. the_block_editor_meta_boxes() C:\wamp64\www\webtest\wp-admin\edit-form-blocks.php:316
      4. do_meta_boxes() C:\wamp64\www\webtest\wp-admin\includes\post.php:2267
      5. PageRestrictForWooCommerce\webtest\Admin\Classic_Metabox_Main->display_metabox() C:\wamp64\www\webtest\wp-admin\includes\template.php:1445
      6. include_once() C:\wamp64\www\hor\wp-content\plugins\page-restrict-for-woocommerce\includes\admin\class-classic-metabox-main.php:63
    Warning:  Invalid argument supplied for foreach() in C:\wamp64\www\webtest\wp-content\plugins\page-restrict-for-woocommerce\admin\partials\page-edit-classic-metabox.php on line 171
    Thread Starter eevan79

    (@eevan79)

    And few more suggestions:

    1. Option to change this text: Your access to this section expired or you haven’t bought products needed to access this page. Buy PRODUCT in order to access this section!
    2. And change the title of Restricted Pages on the My Account page.
    Thread Starter eevan79

    (@eevan79)

    3. Does the timeout option apply globally or is it calculated from the moment the customer unlocked or bought the product? There is no explanation for this anywhere.

    Plugin Author Vlado Grcic

    (@vladogrcic)

    Sorry but I couldn’t recreate it. I installed both plugins and it works fine. Regarding your above suggestions:
    1. You can change that yourself. Globally or per page.
    2. Not really sure why. What is your suggestion?
    3. It times out from when the user buys the product. Not sure why it should be written down. I’d think thats how most people would think it works, not to mention I don’t really understand how fair it would be to have it just globally set. There are of course some more calculations like time between bought products but that seems straightforward to me as well.

    Thread Starter eevan79

    (@eevan79)

    Thank you for answers.

    1. I didn’t noticed options for that. Will take a look.
    2. There are a variety of reasons why someone would protect a page. It might be a presentation or a video clip or some kind of award or whatever. So it would be useful to be able to change that title. Not necessary but can be useful.
    3. maybe because the protected page is some temporary promotion that lasts for a few days. And then it is not related to the purchase but globally. I generally don’t need it, but that’s why I was wondering how this works. Currently it’s fine for me.
    Thread Starter eevan79

    (@eevan79)

    I just noticed another bug. After update every page lost settings and became unrestricted. So, I setup all again. After few days, some pages were restricted but other pages, again, lose all restriction settings (unrestricted). And I setup pages again. Today, 2 pages lost settings (I even did not edited those pages after last bug).

    There is definitely a bug where the page loses restriction settings over time.

    Plugin Author Vlado Grcic

    (@vladogrcic)

    Not sure why it would do that. Either way I’m not able to do anything about it for a while, sorry.

    Thread Starter eevan79

    (@eevan79)

    @vladogrcic no problem. I do it myself without a plugin, with custom fields for product IDs and function that check if user purchased the product. It works fine. Thank you for reply, anyway.

    However, about your plugin…I think it’s related with autosave (when it triggers page restrict settings for the current page is not saved).

    Good luck with plugin and best regards.

    • This reply was modified 10 months, 1 week ago by eevan79.
Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Page settings not saved’ is closed to new replies.