Support » Plugin: Publish 2 » [Plugin: Publish 2] Plugin uses bad add_menu_page arguments

  • In the php/admin.php file is the following section:

    $page = add_submenu_page('options-general.php',
        'Publish 2 Settings',
        'Publish 2', 9, basename(__FILE__),
        array(&$this, 'printAdminPage'));

    The “basename(__FILE__)” turns into “admin.php”. So, this section of code declares that the plugin’s admin menu page is located at Since most generic admin pages are accessed as, this section of code is causing issues with some plugin and theme admin pages. Affected pages simply produce the following error:

    You do not have sufficient permissions to access this page.

    Changing “basename(__FILE__)” to “publish-2-pingfm” fixes the issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Woaaa.. THIS IS THE RIGHT SOLUTION! This took me losing a day to solve this problem cause. I’m trying to install publish 2 ping FM in but it always triggering permission error on wassup plugin. Now, the two work again like a charm.

    Thanks to post your solution Chris Jean!! you are the saviour ! I love you Man!

    AHHHH HAAAAAA!!! Thanks Chris. Nice work.



    Chris, thank you very much!!!

    Hi, we had the same problem with one of our client and found the fix before reading this thread. We fixed the plugin for them and uploaded to our server, if you are not sure how to fix it yourself or if it has not been updated by the developer, the fix is based on version 1.1.
    Feel free to download it from our server, the only thing we changed was the fix for the permissions.

    Hope this helps someone,

    Plugin Dynamo

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Publish 2] Plugin uses bad add_menu_page arguments’ is closed to new replies.