Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
theme system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2013 at 17:33 UTC
Updated:
29 Jul 2014 at 22:38 UTC
Jump to comment: Most recent file
Comments
Comment #1
xjmThe attached test does not fail, so clearly SimpleTest is doing some cache clearing that doesn't happen during normal installation.
Comment #2
xjmThe route is added here:
http://drupalcode.org/project/drupal.git/blob/refs/heads/8.x:/core/modul...
Comment #3
xjmMaybe this is #2004334: Separate Tabs (MENU_LOCAL_TASK) from hook_menu()?
Edit: It's also broken before that commit.
Comment #4
xjmSo this fixes the problem:
This does not:
This means that
$theme->statusis somehow cached incorrectly, even after system_list_reset() is called.I think to test this properly, we have to entirely refactor
system_list(). :) @tim.plunkett pointed me at #2024083: [META] Improve the extension system (modules, profiles, themes).Comment #5
xjmRelated: #1067408: Themes do not have an installation status
Comment #6
xjmThis was not introduced by #2004784: Move module install/uninstall implementations into ModuleInstaller in http://drupalcode.org/project/drupal.git/commit/09db04d, so it's happened sometime since then.
Comment #7
xjmAnd #1808248: Add a separate module install/uninstall step to the config import process.
Comment #8
xjmThis fixes it. No effing clue how to test it without refactoring the entire call chain for system listings, since we can't have a failing web test because of the cache clearing in SimpleTest, and given the sprawling complexity of static calls that is required to add these routes, I think I have a better chance of unit testing my cat.
Comment #8.0
xjmUpdated issue summary.
Comment #8.1
xjmUpdated issue summary.
Comment #8.2
xjmUpdated issue summary.
Comment #9
xjmIt turned out to not be precisely a cache issue after all.
Comment #9.0
xjmUpdated issue summary.
Comment #10
msonnabaum commentedI've also run into this in a few patches already. It *might* be fixed by #2021959: Refactor module handling responsibilities out of DrupalKernel. Worth checking out before we do a workaround like this.
Comment #11
xjmLooks like #2021959: Refactor module handling responsibilities out of DrupalKernel doesn't actually solve the problem, unfortunately.
Comment #12
xjmThis test also doesn't fail:
Turns out all the installer tests actually extend from
WebTestBase.Comment #13
BarisW commentedSame error here. Just clearing caches fixes the problem, even without the patch applied.
Wouldn't a cache-clear after installation be sufficient?
Comment #14
xjm@BarisW, did you try the patch in #8?
Comment #15
BarisW commentedNo I did not as a cache clear resolved the problem as well. Do you want me to try it without a cache clear and with the patch applied?
Comment #16
BarisW commentedI've applied the patch and re-installed Drupal. Now the links work as expected, even without clearing caches.
Comment #17
xjmThanks @BarisW!
The patch here still needs technical review, though, so setting to NR for that. See the @todo.
Comment #18
effulgentsia commentedHow about this instead?
Comment #19
effulgentsia commentedAlso, opened #2058135: Move rebuildable state information into cache system.
Comment #19.0
effulgentsia commentedUpdated issue summary.
Comment #20
xjmYeah that's way better. :)
Where's the fallback? the
if empty($theme_data)hunk below?Can we catch something more specific?
@fubhy linked a mess of other theme-related issues:
#2029819: Implement a ThemeHandler to manage themes (@see ModuleHandler)
#2024043: Add Module, Theme, Profile, and Extension value objects
#2024083: [META] Improve the extension system (modules, profiles, themes)
#1798732: Convert install_task, install_time and install_current_batch to use the state system
Let's add a posptoned followup for the theme status issue to fix
system_list()for themes.Comment #21
xjm#18: theme-settings-2040037-18.patch queued for re-testing.
Comment #23
mtiftThis is basically just a re-roll of #18
I think the hunk is back
I couldn't find any other calls to Drupal::state() wrapped in try-catch blocks. We have a ConfigException, but I don't think we have anything like "StateException." So I guess we could create one like that extends RuntimeException, like this
But, honestly, I'm not sure what that gets us. @xjm: did you have something in mind?
(And like a bazillion other issues, this one will need a re-roll if #2053489: Standardize on \Drupal throughout core gets in.)
Comment #24
mtiftComment #25
socketwench commentedPatch #23 works for me. ^_^
Comment #26
neclimdulRan into this separately. The problem is actually miss-described here. Or at least there's another solution. Conversion to the new route system will solve the problem.
Comment #27
neclimdulTo be more clear because that was a terrible comment, this is all that's needed to solve the 404 and conversion to yaml local tasks after #2076283: Allow local task plugins on paths with a dynamic value (like a node) solves tabs not showing up.
Comment #28
neclimdulwith the route subscriber removed.
Comment #29
tim.plunkettWe just renamed all of the routes, it should be system.theme_settings now.
Comment #31
neclimdulOK, I can't get the simple version of this patch to work anymore. I've got a more in depth conversion that does solve this that I can work or we can roll with the shifting around in #23.
Comment #32
neclimdul#23 went in with #2089635: Convert non-test non-form page callbacks to routes and controllers. (thanks tim just stealing my code like that ;))
Follow up to fix/update tabs.
Comment #33
dawehnerJust a copy and paste of another derivative.
Comment #34
neclimdulDangit, I saw that a while back while waiting for the param patch and forgot to fix it.
Comment #35
neclimduloh and interdiff because i wasn't lazy just forgetful.
Comment #37
neclimdul#34: drupal8.theme-system.2040037-34.patch queued for re-testing.
Comment #38
dawehnerThis seems to be an rerole failure.
Comment #39
neclimdulComment #40
dawehnerManual testing worked fine.
Comment #41
alexpottPatch no longer applies.
Comment #42
mtiftReroll
Comment #43
markhalliwellRe-roll just took out the system theme stuff, back to RTBC.
Comment #44
neclimdullooks great thanks! theme stuff was just to get rid of test warning and someone fixed it first.
Comment #45
alexpottPatch no longer applies.
Comment #46
tim.plunkettThis was trying to add system.local_tasks.yml but HEAD has it now.
Comment #47
tim.plunkett.
Comment #48
dawehnerThank you!
Comment #49
xano#46: theme-2040037-46.patch queued for re-testing.
Comment #50
alexpottPatch no longer applies.
Comment #51
xanoComment #52
neclimdul#2102125: Big Local Task Conversion actually has these changes. We might consider committing it instead, its pretty close.
Comment #52.0
neclimdulUpdated issue summary.