WordPress.org

Forums

Contact Form
[resolved] [plugin: Contact Form] not compatible with DISALLOW_FILE_EDIT (7 posts)

  1. rwatuny
    Member
    Posted 1 year ago #

    Hello,

    When using DISALLOW_FILE_EDIT in wp-config.php as suggested by this article (Hardening_WordPress | WP Codex), the plugin hides its admin menu icon and prevents access to its settings.

    Thank you.

    http://wordpress.org/plugins/contact-form-plugin/

  2. bestwebsoft
    Member
    Plugin Author

    Posted 1 year ago #

    Hi rwatuny,

    Please, follow the instructions:
    1) make sure that you have admin rights, for the page is displayed only for administrators;
    2) If you use a multisite: if you activate the plugin as network, the access to the settings page is permitted from every subsite and is not permitted from the multisite admin panel.
    3) It is possible that you have a peculiar plugin installed, that affects the user access rights. Please try to deactivate the rest of the plugins one by one and check if the problem remains the same.

    If it doesn't help, please tell us what version of WP you are using and send us all the changes you made in the config file.

    Sincerely,
    BestWebSoft Support Team

  3. rwatuny
    Member
    Posted 1 year ago #

    Hello,

    Thank you for your reply.

    1. I do have admin rights.
    2. WordPress is not set as multisite.
    3. I deactivated all plugins except Contact Form and the problem remains.

    I am using the latest WordPress version (3.7.1).

    The only change I made to the config file is to insert this line:
    define('DISALLOW_FILE_EDIT', true);

    I did a quick search in your code and I found that you use the 'edit_themes' capability as a condition for the add_menu_page and the add_submenu_page in the cntctfrm_admin_menu function. This capability is set to 'do_not_allow' by the DISALLOW_FILE_EDIT setting.
    That is why the plugin is hidden and unaccessible.

    May I suggest that you use another capability, for exemple, 'manage_options'.

    Thank you.

  4. bestwebsoft
    Member
    Plugin Author

    Posted 1 year ago #

    Hi again,

    We agree with you. We will change it for'manage_options' in the next update.

    Sincerely,
    BestWebSoft Support Team

  5. rwatuny
    Member
    Posted 1 year ago #

    Thank you very much.

    Have a nice day.

  6. kundantest
    Member
    Posted 1 year ago #

    Hello,

    I have use this but after that edit option of every plugin has removed. So How can i remove only one plugin edit option.

  7. rwatuny
    Member
    Posted 1 year ago #

    To my knowledge, there is no simple way to do this.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic