New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
farmOS theme gets disabled during install #272
Comments
Updated the description because @paul121 tried to replicate the MariaDB version change fix, and it didn't work for him. So then I retried it and it also didn't work for me. I may have done a faulty test previously. Not really sure... in either case, all the rest is still true. So we can pick up where I left off in the shutdown functions and try to trace it. |
Ok I've spent some more time tracing this and have a better idea what's happening now. Turns out that What's really happening is:
So it's because of this AJAX request to If you manually add the So... that's the cause. But there are still questions:
Also worth mentioning: one of the perplexing things here was that this seemed to only be happening in local dev environments. It is NOT happening on Farmier-hosted instances of farmOS. However, once I learned that it was the Therefore, this may have been an issue for a long time - and we just didn't notice it until now. Except those remaining questions are still perplexing... there is more to understand here... |
So actually... there is still another issue: even after fixing the above issue, and the theme is enabled, the farm map header still doesn't display when you visit the dashboard after install. Thankfully, this was a little easier to figure out. What's happening is: the farmOS theme is being installed BEFORE the So that will also need to be fixed. |
I'm digging into this a bit more. Specifically: why does the theme still seem to work even though it is technically disabled in the Well, turns out... it's due to the way That code just looks at the The other hooks in So that explains why this went unnoticed. |
Well... one possible explanation is that
I'm skeptical, though, because technically the In either case, it's obvious that modules are not affected by this. It seems to be only the themes. So I'm not going to dig further into that for now... |
Changed the name of this because it's not only Docker dev environments that are affected by this, presumably. |
Ok so just in case it wasn't clear from the above notes...
That issue, which turned us on to this whole thing, is actually unrelated! Because...
See that comment above for the cause of the map header not showing: #272 (comment) I may break that out to a separate issue, since it is technically not the same issue. |
Spun off a separate issue for the map header specifically: #273 |
Just tested this on Drupal Commerce, and it is in fact happening there as well. The theme is not enabled after installation completes. The difference with Commerce Kickstart, though, is that they are only enabling an admin theme, and still using Bartik as the default theme. So it's even easier to not notice this. |
I tested installation with a I am going to try one other approach (moving the theme installation to a later step in the install tasks), to see if I can avoid strong-arming that variable. |
That did not seem to work. And it still has the issue of the |
@paul121 noticed a strange issue when setting up a new install of farmOS locally using the recommended Docker Compose configuration for development: https://github.com/farmOS/farmOS/blob/028d2266c5b15be1528f5425aa2db78307bc378a/docker/docker-compose.development.yml
The issue (which ended up being the tip of the iceberg) was that the farmOS map header block was not showing up on his farm dashboard.
We spent some time tracing it:
{block}
database table, the farmOS map block was not being enabled.farm_theme_block_info_alter()
function was not running, which is what enables the block in the farmOS theme.{system}
table was being deleted after submitting the form on the "Configure site" install task step. So by the time you were brought to the "Configure farmOS" step (where you select optional modules to install), the theme record was already deleted.exit
call that happens in Drupal core'sinstall_display_output()
function: https://git.drupalcode.org/project/drupal/-/blob/460ff5dc3c577d6139b37bc3467ab5b742371626/includes/install.core.inc#L725_drupal_shutdown_function()
(which runs via PHP's shutdown functions callbacks duringexit
) to see if I could pinpoint further, but needed to go to sleep.In the morning, on a hunch, I decided to try changing the MariaDB version frommariadb:latest
tomariadb:10.4
and that fixed it!So next steps:
_drupal_shutdown_function()
(???)And/or just setimage: mariadb:10.4
in the recommended Docker Compose config.I'd really like to figure out what's happening here - because I'm worried that the disabled theme might not be the only issue. That's just the one we noticed. But in order to understand the extent of this, it's important to understand exactly what is going wrong...
The text was updated successfully, but these errors were encountered: