• w4cdev

    (@w4cdev)


    After install and activation the mainsite and subsite too activated the plugin, but network admin failed to load plugins page with following error, which resulted break of the network site and thus cannit do operational activity for plugins from network site, whilst the main site and subsite plugins are “Network Site Activated”. If manual deletion from file manager then it would cause the database leaving orphaned and affect the project with the db console. Cannot take a chance.
    Usually subdomain created and pointed to path of the domain & subdomain as per server support intruction
    domain.org (Network Admin) site id=”” path public_html/domainorg
    domain.org (Main Domain) site id=”” path public_html/domainorg
    domain.org (subsitesite2) site id=”2′ path public_html/domainorg
    domain.org (subsitesite3) site id=”3′ path public_html/domainorg
    domain.org (subsitesite4) site id=”4′ path public_html/domainorg

    The ERROr report

    Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /home/agestabc/public_html/unitionorg/wp-includes/capabilities.php on line 668
    ( ! ) Error: Call to undefined function wp_get_current_user() in /home/agestabc/public_html/unitionorg/wp-includes/capabilities.php on line 668
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0009	375608	{main}( )	.../index.php:0
    2	0.0011	376632	require_once( '(path-to-project)/wp/wp-admin/network/admin.php' )	.../index.php:11
    3	0.0013	377392	require_once( '(path-to-project)/wp/wp-admin/admin.php' )	.../admin.php:13
    4	0.0014	377824	require_once( '(path-to-project)/wp/wp-load.php' )	.../admin.php:34
    5	0.0015	378512	require_once( '(path-to-project)/wp/wp-config.php' )	.../wp-load.php:37
    6	0.0016	380000	require_once( '(path-to-project)/wp/wp-settings.php' )	.../wp-config.php:108
    7	0.0308	1551840	include_once( '(path-to-project)/wp/wp-content/plugins/admin-menu-groups/admin-menu-groups.php' )	.../wp-settings.php:325
    8	0.0323	1554448	require_once( '(path-to-project)/wp/wp-admin/network/settings.php' )	.../admin-menu-groups.php:15
    9	0.0332	1554560	current_user_can( )	.../settings.php:16

    THE ERROR log generated

    We’ve checked server log and see next error:

    [06-Nov-2020 13:16:17 UTC] WordPress database error Table '(account_dbname).site' doesn't exist for query SELECT site.id FROM site ORDER BY site.id ASC LIMIT 2 made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), require('wp-includes/ms-settings.php'), ms_load_current_site_and_network, get_networks, WP_Network_Query->query, WP_Network_Query->get_networks, WP_Network_Query->get_network_ids

    The reply rec’d further reports from the server

    We have checked the error logs and confirmed the site no longer hitting any errors on the log file located in “/domain.org/error_log”, also we have checked MySQL database db_tbl and confirmed no database errors in it now. In case if the issue still persists please update this ticket with exact steps to recreate the error from our end so that we can investigate this issue and assist you further. If you have any other questions or concerns, please do not hesitate to contact us. It is always our pleasure to be of assistance.

    Regards,

    Further reported by them

    The error message is stating the following “Call to undefined function wp_get_current_user()”, that means that WordPress application cannot find the code of the function with the name wp_get_current_user().
    As you understand, it is an application-level problem and related to your website scripts’ custom code.

    One solution is described here: https://stackoverflow.com/questions/6127559/wordpress-plugin-call-to-undefined-function-wp-get-current-user, but I cannot guarantee that it will work for your custom setup.

    To this our reply :

    It seems that we have already gone thru some of the citings, indeed including your citiation of stackoverflow. link. The captioned snippets has capabilities.php replacing to the pluggable.php (old version of WP). Refering to the new build at the line 637 – 666. The plugins breaks without any error code is what frustrates us when verified the commented development code is renderable to the $current_user (line 64) is empty. So two condition which specifies that the Current user if other than superadmin will return false, (for SuperAdmin the returned value is ‘true’). Second the said $current_user is empty strings’ then returns false. In this case the $current_user is not empty, but has value assigned in the table referred by your colleague ‘Olexsanr’. The Site id is not empty Refer Database: agestabc_wpunorg ?Table: site Screenshot : ‘https://prnt.sc/vf6ksk’ defined path ‘https://domain.org/’ (Main Site) but still the issue that ‘db or table does not exists, although its presence is clearly visible.

    Now take a deeper look already referred in the ticket above, the issue is reported for the plugins ‘admin-menu-group’ at the network admin of the site that returned this error (Screeshot “https://prnt.sc/vf6q4t”_. But correspondingly you can check the same plugin is working fine at the subsite ‘https://admin.domain.org/wp-admin/plugins.php‘ ( https://prnt.sc/vf6r3o ). The second subsite too is working fine “https://test.domain.org/wp-admin/plugins.php” ( https://prnt.sc/vf6s9p ). Both this site the plugins is well network activated. Then the issue with the network plugins is absurd.

    We have gone thru various issue search but identical issue was not so appealing. May be I would be wrong, May be you would be wrong, taking third umpire decision is not bad to the staging and to come at the solution.

    Further your colleague ‘Lene V’ had also reported that the issue was solved and asked us to verify the same at our end, but which we did not find appropriate corrected. Thus sought the recheck and provide the screenshot, which is again been landed at your end.

    Let’s bring instantly the issue with reporting that this plugins was working earlier with out old project which were deleted. Later installed recently last week again same issue for the plugins been reported bad config. This third installation again has worked with the same issue and continued since last 3 deployment almost a month.
    ———
    WE tried our best to peruse the issue with server support, but they were totally illogical narrative and denied on our various search investigated. Indeed we tried the best to explain that when main site and subsite works fine, why the network site returns the error causing the entire site structure ../network/* reporting above error. We are not using wildcard on the domain for security issues, instead configured with creating the subdomain with A Records. Could be the issue with the conflict of ‘Subsite’ and ‘Subdomain’ (‘A’ Record added). As informed by the server support for sub-domain based multisite setting, the main domain and all the sub-domain has been pointed to the path ‘public_html/(domain).org, which we seem that this is the cause for the above error.

    Hope somethign best can be done at your level or appropriation

    The page I need help with: [log in to see the link]

  • The topic ‘Error in admin menu group’ is closed to new replies.