WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Access Manager
[resolved] WP 3.3 Fatal Error (18 posts)

  1. Andrea Pernici
    Member
    Posted 2 years ago #

    With WP 3.3 the plugin make the frontend not working.

    Enabling WP_DEBUG it leads to a Fatal Error.

    http://wordpress.org/extend/plugins/advanced-access-manager/

  2. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Andrea,
    Good call. The WP_DEBUG setup the highest notification level. That is why accessing empty property is treated as fatal error.
    I'm not recommending to user E_ALL report level in fact it can cause some notifications, warning and also error.
    Sorry, but it'll take me 10 times more time to prevent any kind of warnings in WP_DEBUG mode then to develop Advanced Access Manager from scratch.
    The easiest solution for you is just go to advanced-access-manager/module/class-module_user.php and replace the function getCurrentUserRole with next code:
    function getCurrentUserRole() {

    if (is_object($this->data) && isset($this->data->{$this->cap_key})) {
    $result = $this->data->{$this->cap_key};
    } else {
    $result = array();
    }

    return $result;
    }

    I will include this code in next release 1.5.

    Thanks again for this report.
    Regards,
    Vasyl

  3. Andrea Pernici
    Member
    Posted 2 years ago #

    Thanks Vasyl

    now everything works fine.

  4. jimaek
    Member
    Posted 2 years ago #

    Had the same error and your code fixed it but now your plugin is not working. All the settings i make are ignored

  5. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    Hi jimaek,
    Please be sure that you do everything right and saving setting for proper User Role. And remember that for Super Admin Role all settings are ignored.
    Regards,
    Vasyl

  6. jimaek
    Member
    Posted 2 years ago #

    Im changing the correct role(contributor) and im testing it with the correct user.
    Actually the "Capabilities" seems to be working but "Main Menu" and "Metaboxes & widgets" stopped working, i cant hide anything.

  7. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    That is why :) Let me check what new surprise guys from core WordPress team prepared today :)
    Oh, I you talking about the latest release of WP?

  8. jimaek
    Member
    Posted 2 years ago #

    Yes i updated today to 3.3 and applied the above code to fix the 500 errors and since then i have this problem.

  9. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    Interesting. This fix has nothing to do with metaboxes and menu. But I will check it today.
    Thanks for info

  10. jimaek
    Member
    Posted 2 years ago #

    Ok, if you want you can mail me to help you debug the problem. http://hidden-email.com/img.php?hash=uTeAIQzL9fjoqSh

  11. kaffeine
    Member
    Posted 2 years ago #

    Same here, updated from 3.2.1 to 3.3 and blog entries not visible anymore. - Rewinded the DB back to to 3.2.1 and back to working state.

    error.log:
    [<date>] [error] [client <IP>] PHP Fatal error: Cannot access empty property in /var/www/<blog-vhost>/wp-content/plugins/advanced-access-manager/module/class-module_user.php on line 34

    Nonetheless a big thanks for the functionality of this plugins until - it ads exactly what I'm missing in normal WordPress :-)

  12. Yegres
    Member
    Posted 2 years ago #

    Can you update plugin?

  13. Andrey Kiselev
    Member
    Posted 2 years ago #

    Vasil, thank a lot for the prompt fix!!!
    BTW, in my case after upgrading 3.2.1 to 3.3 everything else works pretty well. No problems with settings updating.
    jimaek, are you sure you databases were updated successfully?

  14. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    Guys thanks for all your feedbacks. Today in the evening I'll check all these issue.
    I'm just surprised how fast people hurry to mark it as broken even when Advanced Access Manager is clearly specified that is compatible up to 3.2.1 :)
    I need one-two days to check whats new in WP3.3 messed up and find the compatible solution between 3.2.1 and 3.3.
    Regards,
    Vasyl

  15. spsmw
    Member
    Posted 2 years ago #

    Thank you for getting right on this, Vasyl! Your plugin is super.

    ETA: For what it's worth, I have the same issue as jimaek, where nothing is actually hidden even when I hide metaboxes or what have you through the plugin interface. As jimaek said, the user can't actually DO anything if they don't have the capabilities, but the menus still show up in the dashboard. Who knows?

  16. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    Guys new 1.4.3 release have just been posted.
    This is emergency release and I fixed some issues.
    spsmw and jimaek I was not able to reproduce the fault. Would be nice to send me login to your WP website so I'll be able to check what is wrong.
    Probably this is some unpleasant issue with database during upgrade.

    Thanks everybody for help and sorry for these inconveniences.
    This is only WordPress :)

  17. spsmw
    Member
    Posted 2 years ago #

    Vasyl, whatever you did in the update seemed to fix the issue for me at least. All of my established metabox hiding rules are working again, hooray! Thanks so much for tackling this so quickly. :)

  18. kaffeine
    Member
    Posted 2 years ago #

    A big thanks Vasyl for fixing this so fast - I already voted for a 'works' with 1.4.3 and WP 3.3. Smooth update, no more errors.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic