mobile theme error with WP 6.4 or higher

Home Forums Any Mobile Theme Switcher mobile theme error with WP 6.4 or higher

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #487042
    Kaz
    Guest

    mobile theme error with WP 6.4 or higher

    Hello,

    I have found a problem with a fatal error in the theme for mobile when WordPress is updated to version 6.4 or higher.

    It seems that when a mobile theme is selected, the desktop theme is also loaded first, causing the error due to the absence of files or the inability to redefine scripts.

    I have worked around it by downgrading WordPress to 6.3, but it has not been a radical solution.

    Any help would be much appreciated!

    Sincerely,

    Kaz

    #487043
    Agustín Mustieles
    Guest

    I have the same issue.

    #487065
    Dinesh
    Keymaster

    Hi,

    I just checked our plugin with WordPress 6.4.1. and couldn’t find any fatal error at all. And the theme switching is working fine here. Tested with default wordpress theme.

    Can you send me the error messaging you are getting ?

    Thanks

    #487119
    justin
    Guest

    Just an assumption, but I think whoever has an error after the latest version of wordpress is the “can not redeclare function” error(same with @Kaz). I am also having the same problem and rolled back my wp version to 6.3.2 to fix it temporarily. Please fix!

    #487120
    Dinesh
    Keymaster

    Please send us the exact error message so that we can work on it. So far i am unable to replicate the issue here.

    Also. here is the scenario i am testing with. https://wordpress.org/support/topic/wordpress-6-4-the-plugin-no-longer-works/#post-17190308

    Thanks

    #487121
    justin
    Guest

    PC version : theme_1
    Smartphone version : theme_2

    On the smartphone version this error pops up. PC version is fine (probably due to loading algorithm)

    Error message:

    ‘Fatal error: Cannot redelcare “sample_function_a()” previously declared in “/path/to/theme_1/functions.php” in “/path/to/theme_2/functions.php” on line xxx

    There has been a critical error on this website.’

    #487127
    HUisSebastian
    Guest

    Wrote a wall of text including a fix over at https://wordpress.org/support/topic/wordpress-6-4-the-plugin-no-longer-works/ . Basically, if one of the functions get_template_directory() or get_stylesheet_directory() BEFORE the plugins_loaded hook messes up the correct functioning of Any Mobile theme switcher. In my case, it was the Plugin Meta Box that was the culprit, but it could be any plugin that doesn’t wait until the plugins_loaded hook to call these functions.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘mobile theme error with WP 6.4 or higher’ is closed to new replies.