WordPress.org

Ready to get started?Download WordPress

Forums

User Role Editor
Fatal error on activate (23 posts)

  1. Tom Lynch
    Member
    Posted 3 years ago #

    I get a fatal error message on activation.

  2. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 years ago #

    What WordPress version do you use? Does error message contain other information, not 'fatal error' only?

  3. Tom Lynch
    Member
    Posted 3 years ago #

    3.0.1 and it only shows Fatal Error:

  4. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 years ago #

    Could you try to change
    define('WP_DEBUG', false);
    to
    define('WP_DEBUG', true);
    at your wp-config.php and look for the details of problem concerned with URE plugin at your site?

  5. Tom Lynch
    Member
    Posted 3 years ago #

    Notice: Undefined variable: base in /var/www/vhosts/gdnm.org/httpdocs/wp-includes/ms-settings.php on line 14
    
    Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /var/www/vhosts/gdnm.org/httpdocs/wp-includes/functions.php on line 3237
    
    Notice: define() was called with an argument that is deprecated since version 3.0! The constant VHOST is deprecated. Use the boolean constantSUBDOMAIN_INSTALL in wp-config.php to enable a subdomain configuration. Use is_subdomain_install() to check whether a subdomain configuration is enabled. in /var/www/vhosts/gdnm.org/httpdocs/wp-includes/functions.php on line 3321
    
    Notice: Undefined index: plugins in /var/www/vhosts/gdnm.org/httpdocs/wp-admin/plugins.php on line 16

    Nothing obvious. This was run when there were no other plugins running, but the same errors occour regardless, i.e. they happen when I am not even trying to add your plugin so there are no errors pertaining to your plugin.

  6. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 years ago #

    WordPress should not show any messages of this kind on a clear installation. Something goes wrong. What will be if you try to make default WordPress theme active (if you use some other custom theme of course)? Does any other plugin work on your WordPress installation?

    As a last measure I can see what is wrong on your site myself. I will need administrator access to your blog to check your problem.
    If you decide to accept my help then contact me via shinephp.com contact form or take my email from readme.txt file at the URE plugin installation package.

  7. Tom Lynch
    Member
    Posted 3 years ago #

    What will be if you try to make default WordPress theme active (if you use some other custom theme of course)? Does any other plugin work on your WordPress installation?

    I have set it to this and it still shows the errors, furthermore I have debugged all plugins and fixed all the errors, however I tested with them all off initally, I am now down to two notices:

    Notice: Undefined variable: base in /wp-includes/ms-settings.php on line 14
    Notice: Undefined index: plugins in /wp-admin/plugins.php on line 16

    I feel that this is now down to an odd incompatibility.

    I would love your help perhaps we can work over skype or similar?

  8. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 years ago #

    Good.As you are familiar with PHP I'm sure you can isolate the problem yourself :). Let's continue:
    1st, $base variable at line 14 of ms-settings.php is related WordPress multi-site configuration section at wp-config.php. You should have something like this there

    define( 'MULTISITE', true );
    
    define( 'SUBDOMAIN_INSTALL', false );
    
    $base = '/';
    
    define( 'DOMAIN_CURRENT_SITE', 'yoursite.here' );
    
    define( 'PATH_CURRENT_SITE', '/' );
    
    define( 'SITE_ID_CURRENT_SITE', 1 );
    
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    Please check. You have not $base variable defined at your wp-config.php for now. May be next notice at line 16 at plugins.php has the same reason. So please re-check your multi-site configuration and share results.

    2nd, you can configure your PHP to write all error messages into file. So nothing be missed. Setup

    error_log = /folder-of-your-choice/phperrors.log
    log_errors = On

    parameters at php.ini
    You should see the reason of fatal error during User Role Editor plugin activation then.

  9. Tom Lynch
    Member
    Posted 3 years ago #

    Okay I checked for the $base thing and found no line written as $base so to suppress the error I have added...

    $base = NULL;

    The $plugin thing is a known error in WP 3 and is fixed in 3.1, I have patched core with the known patch they had and thats sorted that.

    Finally I went through my theme fixing all the notices and now all the plguins and themes are clean, it rarly if ever throws any notices so I have debugging on and ran the Network Activate and regular Activate options, there are no errors at all, ziltch.

    What next ?!

  10. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 years ago #

    OK.I think that use NULL for the $base is not the best decision. Look at the ms-settings.php

    // $base sanity check.
    if ( 'BASE' == $base )
    	die( /*WP_I18N_BASE_ERROR*/'Configuration error in <code>wp-config.php</code>. <code>$base</code> is set to <code>BASE</code> when it should be like <code>/</code> or <code>/blogs/</code>.'/*/WP_I18N_BASE_ERROR*/ );

    So, you should put a real path to your blog base there.

    What's next? Find what the reason of failure during URE activation. You need to redirect all PHP error messages into log file. And see what you have there when activate URE plugin.

  11. Tom Lynch
    Member
    Posted 3 years ago #

    What's next? Find what the reason of failure during URE activation. You need to redirect all PHP error messages into log file. And see what you have there when activate URE plugin.

    Thats what I am saying, I did this, I set E_ALL and everything you'd need to do to have it log, and once I fixed the various errors in other plugins and themes or disabled them I was left with no errors.

    Thats why I said whats next?

  12. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 years ago #

    I remember that this thread was started from the fatal error message on URE plugin activation. Do you still have that? Is there still just 'fatal error' text without any additional information in the error log file? PHP should explain the reason of fatal error and give you a hint as file name and code line number where it is happened. So I wait this information from you.

  13. Tom Lynch
    Member
    Posted 3 years ago #

    Yep, basically before activating the debug mode as instructed it just said fatal error with no message, since activating debug mode it has shown errors for other stuff, which I have cleaned up and fixed, so now its back to not showing any errors when the fatal error comes up.

  14. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 years ago #

    It is very strange. I hoped to see that fatal error reason in the PHP error log file. So you have not any errors in your PHP log file, right?
    Are you sure PHP writes its error messages there? Just execute any test PHP script with some syntax error in it and check that.

    Is this localhost installation? I mean could you use debugger to go through the plugin code step by step? To isolate where error is occur.

    Or send your installation copy to me (code and database export script) I will try to reproduce your problem myself. My contact email is included into plugin readme.txt file.

  15. Tom Lynch
    Member
    Posted 3 years ago #

    Its not writing anything at all in the file to do with this plugin, there are a couple of errors but not related or at the time of failure...

    Its a live install so I can't debug, nor have i ever used a php debugger tbh either...

    I can't really send the install to you its massive and full of private data which isn't mine, I am super stuck for what to do.

  16. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 years ago #

    I understood. You can delete any private data content as wp_users, wp_posts, wp_comments from the export data file. It is not related to the problem I'm sure. Do not include 'wp-content/uploads' directory.
    Is this variant possible?

  17. jean-gui
    Member
    Posted 3 years ago #

    I used to have the same problem until I added define ('WPLANG', ''); in my config file. Tom might have the same issue.

  18. TomTech
    Member
    Posted 3 years ago #

    I had the same issue, with a silent fatal error during plugin activation, and jean-gui's solution also worked for me.

    I believe this is because of the check in ure-lib.php:

    if (!defined("WPLANG")) {
    die; // Silence is golden, direct call is prohibited
    }

    my config did not have WPLANG defined...could another property be checked instead? Or at least log an error so that we could have seen this in the php error log?

  19. Vladimir Garagulya
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you for pointing me on that. I will change this checking to something more universal and definitely existing in the most of WP installations.

    By the way, it seems to me that WP has this constant defined from 2.7 version or earlier. Quote from version 3.1.1 wp-config-sample.php:

    /**
     * WordPress Localized Language, defaults to English.
     *
     * Change this to localize WordPress. A corresponding MO file for the chosen
     * language must be installed to wp-content/languages. For example, install
     * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
     * language support.
     */
    define('WPLANG', '');
  20. mingya
    Member
    Posted 2 years ago #

    I have the same problem, "Plugin could not be activated because it triggered a fatal error." trying to activate it on both WP 3.1.3 and 3.2.

    What could have caused this?

  21. Vladimir Garagulya
    Member
    Plugin Author

    Posted 2 years ago #

    What version of "User Role Editor" do you try to activate?

  22. mingya
    Member
    Posted 2 years ago #

    I was out for few days, just returned. Thanks for responding.

    The "User Role Editor" version is 3.1.1, the latest on wordpress.org plugin area.

  23. Vladimir Garagulya
    Member
    Plugin Author

    Posted 2 years ago #

    Deactivate all others plugin and check again. If 'User Role Editor' still could not be activated.
    Try to change your wp-config.php file, set WP_DEBUG constant to true, e.g.

    //define('WP_DEBUG', false);
    
    define('WP_DEBUG', true);

    It should show you full error message, from which we can get idea about the reason of your problem.

    Note: do not send here real paths to your blog, remove path parts till WP subdirectories.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic