PHP Fatal error: Cannot redeclare gin_theme_suggestions_table_alter()

Created on 17 July 2024, about 2 months ago
Updated 30 July 2024, about 1 month ago

I have a D10.3.1 site with Gin Admin Theme 8.x-3.0-rc13 enabled, and on my local box (PHP 8.2.21, MySQL 8.0.36) it runs fine, but when I upload it to my VPS (PHP 8.2.20, 10.6.18-MariaDB) the pages for anonymous users load fine, but when I try to log in or access any admin page I get a 500 error. Checking the PHP error logs I see

PHP Fatal error: Cannot redeclare gin_theme_suggestions_table_alter() (previously declared in /home/mysite/public_html/web/themes/contrib/gin/includes/table.theme:11) in /home/mysite/public_html/web/themes/contrib/gin/includes/theme.theme on line 145

That’s the only error. I’m stumped. The only difference would seem to be MySQL vs. MariaDB. I am using Gin Login, so I apologize if I’m posting in the wrong place.

πŸ’¬ Support request
Status

Closed: cannot reproduce

Component

Code

Created by

πŸ‡­πŸ‡ΊHungary Grabby

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Grabby
  • πŸ‡­πŸ‡ΊHungary Grabby

    Just wanted to follow up to say I changed the admin theme to Seven and disabled and uninstalled Gin on my local box and then uploaded the site to the VPS, where it works fine, so the problem definitely has something to do with Gin.

  • Status changed to Closed: cannot reproduce about 2 months ago
  • πŸ‡¨πŸ‡­Switzerland saschaeggi Zurich

    As we don't declare anything in table.theme (as it got removed) it could either be the following:

    • Cache: Clear all the PHP and Drupal caches
    • Remove patches if you use any as they might not be compatible with the latest release and you might need to update them
  • Just want to add that I ran into this same problem today, and the easy fix was just to reinstall the Gin Admin theme module after publishing it to production (for anyone else running into this issue).

  • πŸ‡ΊπŸ‡ΈUnited States wylbur Minneapolis, Minnesota, USA

    We ran into the same issue today while deploying a site to the LIVE production server. The issue for us was that our deploy process does not run composer install on the LIVE server. This was leaving old files from a previous install of the Gin theme on the server. For us we just removed the table.theme file from the includes folder:
    /home/mysite/public_html/web/themes/contrib/gin/includes/table.theme

    For others, just remove the gin theme folder and completely reinstall.

    Hope this helps others!

Production build 0.71.5 2024