# 3.3.3 Cannot redeclare gin\_theme\_suggestions\_table\_alter() - SOLVED

**URL:** <https://farmos.discourse.group/t/3-3-3-cannot-redeclare-gin-theme-suggestions-table-alter-solved/2223>\
**Category:** Hosting farmOS\
**Created:** [February 9, 2025, 5:21pm UTC](https://farmos.discourse.group/t/3-3-3-cannot-redeclare-gin-theme-suggestions-table-alter-solved/2223 "2025-02-09T17:21:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![marlonv](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/marlonv/32/1873_2.png) [@marlonv](https://farmos.discourse.group/u/marlonv)\
**Post date:** [February 9, 2025, 5:21pm UTC](https://farmos.discourse.group/t/3-3-3-cannot-redeclare-gin-theme-suggestions-table-alter-solved/2223/1 "2025-02-09T17:21:38Z")

</div>

Hi  
I only managed to get to updating my farmos installs now, so I am a bit late to 3.3.3. As usual, it’s not smooth at all for me. I noticed some other issues on the forums, but they don’t seem to be related to this one.

I unpacked, overwrote the neccesary (except sites), drush’d, composer updated (twice) and did the update.php things, and I get a 500.  
Cannot do “admin/config/development/performance” due to the 500.

Logs entry of note:

```auto
[09-Feb-2025 19:15:28 Africa/Johannesburg] PHP Fatal error: Cannot redeclare gin_theme_suggestions_table_alter() (previously declared in /home/farmos/public_html/web/themes/gin/includes/table.theme:11) in /home/farmos/public_html/web/themes/gin/includes/theme.theme on line 145

```

I hope that this is a simple issue and that I won’t need some rare potion. Thank you in advance to anyone with some ideas

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 9, 2025, 5:36pm UTC](https://farmos.discourse.group/t/3-3-3-cannot-redeclare-gin-theme-suggestions-table-alter-solved/2223/2 "2025-02-09T17:36:42Z")

</div>

> [@marlonv](#):
>
> I unpacked, overwrote the neccesary (except sites)

Did you _delete_ everything (except sites), and then replace it with the fresh code? Overwriting alone doesn’t guarantee that files that need to be removed are deleted.

I don’t know if Gin changed which file their `gin_theme_suggestions_table_alter()` function is in, but if they did, and they removed `gin/includes/table.theme`, but you didn’t, then that would explain your error.

---

<div class="post-metadata">

**Author:** ![marlonv](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/marlonv/32/1873_2.png) [@marlonv](https://farmos.discourse.group/u/marlonv)\
**Post date:** [February 9, 2025, 5:38pm UTC](https://farmos.discourse.group/t/3-3-3-cannot-redeclare-gin-theme-suggestions-table-alter-solved/2223/3 "2025-02-09T17:38:48Z")

</div>

No, always did a overwrite. Delete makes sense, but again, didn’t know. Suddenly something new. Drupal’s process of updating is far from friendly and welcoming. THanks Mike, appreciate. Will give that a try

---

<div class="post-metadata">

**Author:** ![marlonv](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/marlonv/32/1873_2.png) [@marlonv](https://farmos.discourse.group/u/marlonv)\
**Post date:** [February 9, 2025, 5:55pm UTC](https://farmos.discourse.group/t/3-3-3-cannot-redeclare-gin-theme-suggestions-table-alter-solved/2223/4 "2025-02-09T17:55:57Z")

</div>

@mstenta Thank you for the advice.  
Deleting (well, renaming everything to \_old) and bringing in the new package solved it. Apart from having to re-require all the modules/extensions, it solved the issue. Will have to add a note to the list of things needed to upgrade.

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 9, 2025, 6:09pm UTC](https://farmos.discourse.group/t/3-3-3-cannot-redeclare-gin-theme-suggestions-table-alter-solved/2223/5 "2025-02-09T18:09:01Z")

</div>

Glad that helped @marlonv.

For what it’s worth, this “packaged release” approach to installing/updating farmOS is a legacy option we provide to try to make it easier for folks on shared hosting. Drupal has long moved away from this, in favor of using Composer commands directly.

We will most likely be moving to this as well in farmOS 4.x+, because of these exact issues.

---

<div class="post-metadata">

**Author:** ![matt.sorenson](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/matt.sorenson/32/48_2.png) [@matt.sorenson](https://farmos.discourse.group/u/matt.sorenson)\
**Post date:** [February 10, 2025, 9:50pm UTC](https://farmos.discourse.group/t/3-3-3-cannot-redeclare-gin-theme-suggestions-table-alter-solved/2223/6 "2025-02-10T21:50:43Z")

</div>

> [@marlonv](#):
>
> _Drupal’s process of updating is far from friendly and welcoming._

In my experience, Drupal’s update process pre-dating `composer`-managed systems, was quite a bit nicer than what most other frameworks offered.

For anyone still relying on this, it does help to have a simple trick or two up your sleeve. I manage all my php projects with `composer` now, but something I used to do back in the days when I managed drupal deployments this way, was that I’d always keep my `/sites` dir outside of the drupal directory, and simply link it in with a symbolic link. When an update became available, I’d drop the latest release into a new directory, and symlink my `/sites` into that one, run necessary update scripts, test, and then configure the web server for that directory and cycle it. If any problems emerged, the previous version remained in tact and unchanged… dead simple to rollback to it, in a pinch.

This could be thought of as the _poor man’s “blue-green” deployment strategy_ 🙂

* * *

I think Drupal’s maturation process away from the ^ above described ways, to becoming a `composer`-managed system was much more drawn out, perhaps more painful process than a lot of other php frameworks, but it has been mature for awhile now.

> [@mstenta](#):
>
> _For what it’s worth, this “packaged release” approach to installing/updating farmOS is a legacy option we provide to try to make it easier for folks on shared hosting. Drupal has long moved away from this, in favor of using Composer commands directly._
> 
> _We will most likely be moving to this as well in farmOS 4.x+, because of these exact issues._

It’s generous of Mike and FarmOS to continue offering the packaged release, but the friction will continue to grow and so embracing `composer`-managed deployments (and ideally also your own version control) hopefully is on everyone’s radar.
