Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
RenderAsset('Panel') returning NULL
sddp
New
Under my customized theme, in themes/mytheme/views/admin.master.php when it calls RenderAsset('Panel') it returns nothing. I did check it with var_dump() as well, and it is returning NULL.
In the other hand it works when using the default theme 'Vanila'...
What am I missing?
<?php $this->RenderAsset('Panel'); ?>
0
Answers
@sddp
Your custom theme would normally be taking the html/php side of things from views/default.master.php (or.tpl).
Do you have a default.master as well, or just the admin.master?
@sddp
Did you specifically want a customised admin page?
If not, try deleting that admin.master from your theme views folder.
Hey whu606 thank you. I do have both files, the admin.master and default.master as well.
They are not customized (I do not want them to be), they are just a copy from the default theme.
I will try to delete them from my custom theme's folder and see what happens.
@sddp
Hope it works.
For theming, as you probably know now, you only need design/custom.css if all you want to change is some css declarations.
The custom.css file doesn't need to be a copy of the Vanilla css file. It can contain a single declaration, if that is all you want to change.
You only need to copy over the default.master file if you want to make some php/html changes.
Thank you for your help whu606, for some reason it does not work.
The files have been removed from that folder so it vanilla has to load them from the default, and it is still not returning the Panel.
The customization is 100% on the style sheets, so I think it should work fine.
I will try to see if I can make vanilla report errors, and hopefully find the little thing it's not making it work
@sddp
Make sure there is not a declaration in the custom.css
.Panel {display:none}
or something similar.
@sddp Are you on 2.0.18.8 or 2.1? You will want to clear out the template cache files, or turn on debugassets on 2.1.
Welcome to the community!
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@whu606 Thanks, no CSS has been declared to hide the .Panel I still don't know what is causing this.
@hgtonight It is the 18.8 version what I am using, I have clear out the template cache files, still not getting that Panel to show up.
try out the AdminThemeSwitcher plugin and see if it is theme problem. I made the themes and I know there is a panel .
If you see the panel div in the source , it means it is there but under visibility hidden since the space it occupies is still there .
to enable the plugin access the plugin page /dashboard/settings/plugins
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder thank you, the div it's empty because the $this->RenderAsset('Panel') function is returning NULL. It is fully visible, but it's contents is empty.
I am trying to figure out what's going on, it doesn't seem to happen to anyone else.
@sddp Would you mind posting the contents of your default.master.php file?
If you do, enclose it in a code block:
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
I think it has more to do with maybe $this->AddModule($SideMenu, 'Panel');
/applications/dashboard/controllers/class.dashboardcontroller.php
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@hgtonight
the default.master.php does not affect the dashboard view is controlled by and uses
admin.css for the style.
class.dashboardcontroller.php
applications/dashboard/views/admin.master.php
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
You are completely right. I have just typed default.master so many types I didn't even think about it.
@sddp Could you post your admin.master.php file?
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Sorry for the delay.
Thank you so much @vrijvlinder I have not touch the css, and for what I see the Panel is no visible.
@hgtonight This is the content of admin.master.php
Line #32 is the one that returns NULL.
Ok I see the problem @sddp
add this instead of the line you have< ?php $this->RenderAsset('Panel'); ? > but remove the spaces I added between the < > so they could show here.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
this is my admin.php so you can compare the two, maybe you could just download the app again and only substitute the dashboard folder.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
It's very estrange that it is not showing the complete code after I did copy and paste it here.
Here is what I got, which is exactly what you have @vrijvlinder
Yes I see, the only other option I can give is to replace the entire dashboard folder with a fresh one. Just ftp the dashboard folder into the applications folder and it will overwrite the old one.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder thank you, I tried that still doesn't work.
I am very close to give up hahahaha. I tried a theme made by a friend of mine, same error. I have vanilla now installed in a different server.... Oh well. I will let you guys know.
Thank you very much for all the time and help.