Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hey guys,
I enabled it, I configured the blocks to be shown, but when I go to http://www.example.com/user/uid/dashboard all I get is the My account page.
How can I get it to show what I just configured? or better said, how can I get it to show at all?
Thanks,
Comment | File | Size | Author |
---|---|---|---|
#20 | dashboard_widget_browser_preprocess.patch | 938 bytes | codekarate |
#11 | dashboard_widget_browser_preprocess.patch | 716 bytes | codekarate |
Comments
Comment #1
jfha73 CreditAttribution: jfha73 commentedOK, I finally found how to get it to show, but now after adding widgets I try to have a user to show this widgets to his dashboard, when he clicks on More widgets, he gets this:
Any idea what can be causing this?
Comment #2
jfha73 CreditAttribution: jfha73 commentedOK, this is what I have done so far.
I uninstalled v2.1 and installed 2.x-dev, that got rid of the error, but now when I visit www.example.com/dashboard all I see is an empty box, not the widgets I configured to show, also, when I go to More widgets, it's empty, any ideas what I might be doing wrong?
Comment #3
glance CreditAttribution: glance commentedHi,
Can you tell me how did you manage to show things on xxx/user/uid/dashboard
I am facing the same problem here.
Thanks.
Comment #4
jfha73 CreditAttribution: jfha73 commentedI managed to show the dashboard just by logging in and going to www.domain.com/dashboard, but I still don't get what I have configured for the widgets.
In other words, the path to the dashboard is the one above, but in my case it still doesn't show anything.
Comment #5
codekarate CreditAttribution: codekarate commentedAre you able to add widgets using the widgets tab on the dashboard page? You should be able to click on that tab and add some widgets to your dashboard. If you can not see the widgets in the widgets tab then take a look at http://drupal.org/node/869016 because it may be a similar issue. In my case I had to clear the theme registry to get the widgets to show up.
Comment #6
jfha73 CreditAttribution: jfha73 commentedNo, that doesn't work for me either, I will try what they suggest there (clear the cache 3 times) :)
Comment #7
jfha73 CreditAttribution: jfha73 commentedI cleared the cache but all I see is the recent posts in Dashboard, when I click to add widgets, nothing happens, all I get is a page with no widgets.
Comment #8
codekarate CreditAttribution: codekarate commentedClearing the cache in itself does not seem to work, you need to clear the theme registry specifically. This can be done using the Admin menu module or Drush.
If you download the admin menu module, you can clear the "theme registry" while you are on the blank "add widgets" page and it will work. Or if you are using a theme that allows you to rebuild the theme registry on every page load, you can enable that and it will always work. However, it would not be a good idea to have the theme registry rebuilt on a production site as it severely hurts performance.
I am still planning on looking into this more to try to figure out the underlying caching issues, I just have not had the time yet.
Comment #9
jfha73 CreditAttribution: jfha73 commentedI'm using a test site with everything the same as the live site so I can test, I downloaded the admin module, but I could not find anything that allows me to clear the registry cache of the theme, so I guess the theme doesn't have that option, I also downloaded Drush, but I have no idea what to do with this, so I have not test it yet.
If you have information on how to clear this registry using Drush or even using phpMyAdmin I'd appreciate it.
Let us know when you have fixed this problem, in my case I'd love to see it working in my site and I bet my users will love it.
Comment #10
codekarate CreditAttribution: codekarate commentedI have been waiting to see if the maintainer would have an easy fix for this but it seems like he hasn't checked up on this in quite some time. I plan on looking at this either today or tomorrow because I need it fixed as well. I will try to find a fix and post a patch here if I am able to figure out the issue.
Comment #11
codekarate CreditAttribution: codekarate commentedOk I finally took the plunge and sat down to figure out this bug. It seems to be something really weird that is going on with the template_preprocess_dashboard_widget_browser not being called when you go to the dashboard/widgets page. For some reason if you clear the theme registry right before the page load it will call that function but not under normal circumstances.
I honestly can not figure out why this function is not being called as it should be called every time based on the hook_theme documentation and template_preprocess documentation that I have been looking over. I am not sure if this is some weird bug in the dashboard module or perhaps something in core.
Either way I found a very easy workaround by explicitly telling the module to call the function in the hook_theme implementation. I would be interested to know what the root cause of this issue really is, if there is someone with more Drupal theming knowledge that knows the intricacies of preprocessing functions, they may be able to more easily find the root cause of this bug... until then, here is the handy workaround patch that should do the trick.
Let me know if it works.
Comment #12
jfha73 CreditAttribution: jfha73 commentedI guess I'm going to have to wait for the next release of this module because I don't have shell access in the server where I have my test site.
Can this be included in the dev version of the module?
Comment #13
codekarate CreditAttribution: codekarate commentedSince I am not the maintainer I can't add it to the dev version of the module. You should be able to pull the module down on your local system, run the patch, and then upload it to the site. If you can't, I can probably send you the patched version (it would be nice for me to have some others test it to make sure the patch works outside my test environment).
Otherwise, the patch is only a one line change, just open up the dashboard.module file and add a line of code after line 238. Just change:
To:
You should then be able to upload that to your site.
Comment #14
broncomania CreditAttribution: broncomania commentedThx for this post in combination with my post here http://drupal.org/node/1036994 everything works now. I think it's time for the next dev update. These both fixes are really nessesary to get the dashboard module run.
Comment #15
jfha73 CreditAttribution: jfha73 commentedOK, with these updates I can see the blocks I made available in the more widgets page, but I still can't get them to be seen in the actual dashboard.
Am I forgetting something here?
Comment #16
codekarate CreditAttribution: codekarate commentedI would make sure to clear the cache just to make sure. Then try to go back to the widgets page and re-add some items. If it still does not work, then make sure you have the jquery_ui module installed correctly. When installing the jquery_ui module you need to add the jquery_ui library. There is information on how to install it in the README file inside the jquery_ui module.
Comment #17
jfha73 CreditAttribution: jfha73 commentedI cleared the cache, verified jquery library and everything is in place, I even tried uninstalling both modules (Dashboard and jquery) but I still don't get my blocks to show in the Dashboard page, they do show in the widgets area, but I don't get anything to select to make them appear in the Dashboard page.
Again, I might be missing something, can somebody tell me the steps I need to follow to get ir up and running from the beginning so I can check I did everything the right way?
Thanks in advance.
Comment #18
codekarate CreditAttribution: codekarate commentedIt appears you are correct, my fix displays the dashboard widgets but for some reason does not display the link to add them to your dashboard. This still appears to be a theme registry or caching issue. I will be looking into it more today.
Comment #19
codekarate CreditAttribution: codekarate commentedOk, again its the same issue as before but with a different theme function. Here is the quick change to the code, after I confirm that this is the last issue I will upload a new patch file with both of these changes.
Change dashboard.module around line 240 from:
To:
Just adding the preprocess function piece. Still not sure why it is necessary, but it appear to work.
Comment #20
codekarate CreditAttribution: codekarate commentedHere is the patch.
Comment #21
jfha73 CreditAttribution: jfha73 commentedNow I see the Add to dashboard link, at least from my side, it's confirmed it works.
Comment #22
chiragjain CreditAttribution: chiragjain commentedHow to install the patch
Comment #23
codekarate CreditAttribution: codekarate commentedThis should help http://drupal.org/patch/apply
Comment #24
plopesc