Closed (won't fix)
Project:
Drupal core
Version:
8.0.x-dev
Component:
dashboard.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2010 at 13:45 UTC
Updated:
29 Jul 2014 at 19:08 UTC
Jump to comment: Most recent file
Comments
Comment #1
David_Rothstein commentedPartially a duplicate of #950878: Disabling the dashboard module permanently removes all blocks from the dashboard?
Although @carlos8f already has a patch up there that solves that bug in a different way, so maybe it is better to split this off from the bugfix anyway.
Comment #2
David_Rothstein commentedI'm working on this, and so far it is looking very promising, actually.
Comment #3
David_Rothstein commentedThis patch is what I had in mind from the discussion at #950878: Disabling the dashboard module permanently removes all blocks from the dashboard and I think similar to the idea here as well.
It doesn't solve #601932: Allow dashboard to limit available blocks by itself, but the UI you get for free from this (see attached screenshot) might help there, in addition to the other benefits of approach.
The remaining issues, though, are these:
Comment #4
sunYes, that's what does not work. The entire approach of squeezing dashboard regions into another theme and somehow hiding them from the regular theme regions, but only conditionally blahblahblah... is just a completely weird overhead we simply do not want and need.
Instead, Dashboard must be considered as "PoormansPanels" or "PoormansDisplaySuite", but simply implemented as a "stub-theme" that ships with a module. It ships with its own regions, which all apply to Dashboard's output only, but NOT the entire rest of the page. The entire rest of the page is a regular page, using the regular theme, and using the regular theme regions.
Powered by Dreditor.
Comment #5
carlos8f commentedSubscribing
Comment #6
David_Rothstein commentedOK, so it sounds like this needs work.
Comment #7
sunMore along the lines of what I meant. Will pretty much change 80% of the entire current implementation.
Apparently, this patch + approach also resolves another problem I have in contrib currently: Modules (like Edge, Skinr) are not able test theme related functionality at all, since only Drupal core can add hidden test themes into one of the 'themes' directories.
Comment #9
David_Rothstein commentedHm... I'm guessing there's a dashboard_theme.info file that accidentally got left out of this patch? :)
Adding a new hook_system_rebuild_theme_data() is likely to get some pushback at this point. We should try to do this issue without that. I don't think it's the end of the world to ship a separate 'dashboard_theme' in the themes directory.
Never enabling the fake theme (and only using it to construct the dashboard regions themselves, not the whole page) seems to make a lot of sense! I think that means:
Comment #10
David_Rothstein commentedI am not the only person working on this issue, so unassigning myself to avoid confusion.
Comment #11
sunSplitted that new hook into #953336: Contributed modules are not able to test theme-related functionality
Comment #12
David_Rothstein commentedAttempting to fix some of the issues above revealed a bunch more bugs. I'm getting less optimistic that we can effectively make this work without the dashboard theme being enabled and/or being the actual theme used to render the page :( A lot of modules make assumptions about which themes they are dealing with and their expected status.
In any case, the attached version mostly works now - the dashboard correctly renders the blocks and allows you to arrange them. There will be at least one test failure, though, and it's real. It's because block_add_block_form_submit() only saves data to the database for currently enabled themes, so when a new block is added, it does not get recorded correctly for the dashboard theme. This is an example of something I'm not quite sure what to do about.
I went back to putting this in themes/dashboard_theme for now (so we don't have to deal with a new hook), but looking at #953336: Contributed modules are not able to test theme-related functionality that issue does seem to make a lot of sense.
Comment #14
David_Rothstein commentedThis version should solve the remaining issues discussed above. I do not know of any functional bugs with this one; the patch seems to work fine now, and the only thing missing is an upgrade path.
There are some hacks here, no doubt, and they should be discussed. But none that seem totally beyond the pale to me.
Comment #15
David_Rothstein commentedAs this is marked "task" not "bug report", here is a reminder of what this patch does and why it is worth pursuing still:
For end users:
1. Makes it so that putting a block on the dashboard does not prevent the block from being placed anywhere else on the site, or vice versa (identified elsewhere as a serious WTF).
2. Allows the dashboard regions to get their own dropdown on a block's configuration page (http://drupal.org/files/issues/block-configure-dashboard-separate-theme.png), rather than being buried rather confusingly in one of the other dropdowns.
For the code:
1. This patch removes many more lines of code than it adds, and overall makes the module simpler:
Comment #16
carlos8f commentedI'm not so hot on adding a /themes/dashboard_theme. I'd rather that this issue be put off until #953336: Contributed modules are not able to test theme-related functionality is approved, that way we can do /modules/dashboard/dashboard_theme instead.
Also, if you want to judge a patch on number of lines removed, I think http://drupal.org/files/issues/dashboard_real_fix_0.patch wins :D
Comment #17
dmitrig01 commentedIn my opinion, this is just trying to help remedy the fact that blocks are just terribly broken (the fact that you can't assign one block to more than one region), which is not the way to go. I don't think there is a solution for Drupal 7, but for Drupal 8, I think this is totally fixable (Butler!)
Comment #18
catchComment #19
yoroy commentedAgreed with #17, this is symptom fixing. Consider downgrading from major to normal priority.
Comment #20
David_Rothstein commentedLet's retitle this to focus on the goal, rather than the implementation.
If someone has a different implementation that meets the goal and is achievable, they can feel free to propose it. But the above patch was pretty close to working, and would have been fine for Drupal 7 if it had been finished at the time (though probably no way to backport it to D7 now).
Comment #21
Johnz86 commentedThis Module is a killer feature in larger projects. If you have more admins a lot of contributors and set the blocks, views right it simplifies the work. I use it in my personal site too. For example i have some blocks, which display latest g+ contributions, tweets, facebook etc. In the main content area i have my last created pages with a button for sharing on social sites. The main point is - nobody uses it, becouse nobody nows how! If somebody set up some usefull blocks, published some usefully views it would be a different story. If u sometime remove it from core, make it at least a working module.
Comment #22
tim.plunkettPatch needs to be rerolled. And may be obsolete due to SCOTCH?
Comment #23
xjmI agree that this does not qualify as major, especially since it's not at all backportable and it hasn't seen enough traction to even get a reroll since D7 was released.
Let's still leave the issue open until such time as (hopefully) SCOTCH resolves the issue in a way that is not a big, clever hack.
Comment #24
xjmIt's been removed from core.