Comments (18)
Well need more info if we are to help. Can you check your browser console for any errors! Also check the app/logs and/or webserver log!
First guess is either a problem with the loading of the stylesheets or js!
from admin.
Thanks for your quick reply!
I have checked the logs and there are no errors as a result of the admin plugin, also checked the browser console and again, no errors here.
I suspect you may be right about stylesheets or js. I am currently using the "cakestrap" theme, might this have something to do with it? Also I just checked and none of the css or js files associated with the plugin appear to be loaded. I guess this may be the issue?
Thanks again,
Duncan
Edit - Done a little more digging and I believe the error may have something to do with the fact that, rather than displaying as a standalone admin panel, it is all contained WITHIN my main site layout. Hope this will help shed some more like on the issue.
from admin.
Try adding
$this->layout = 'Admin.default';
to Plugin.Controller.AdminController.php
inside index function, like:
public function index(){
$this->layout = 'Admin.default';
}
This should work in CakePHP version 2.3.7 and above
If this works let me know...
from admin.
Have just tried what you suggest but it doesn't appear to have worked.
And I am on version 2.3.8 currently FYI.
I think there may be an issue causing the page to stop loading within the layout file, as the things towards the bottom of default.ctp are not outputting at all. In fact I tried adding content to default.ctp even further up, right below the body tag and still nothing changed on the actual output. Not at all sure what is happening here.
Update - Right I disabled my cakestrap theme for the whole site and it now works totally fine. Obviously given this is my theme, it isn't ideal by any means, but I guess it may shed some light on the cause of the problem!
Anything else you can suggest? :S
from admin.
hmm! To reproduce your case would take a little while so just to give it another try, changing it to:
$this->plugin = "Admin";
$this->layout = "default";
from admin.
Just tried that again for you, still no change with that :(
Thank you again for all your help, really do appreciate it :)
from admin.
Will replicate your case on Friday/Saturday (depending on time available) and see what is happening. At the mean time I just checked the code base (the above will not work as the plugin is using cake scaffolding to generate the views, I forgot).
I think in your app JQuery is loaded twice and its causing the problem (this is a guess).
So try this instead... In AdminAppController.php and in AdminController.php add the following
This should force the admin panel scaffolding to use Plugin default layout.
public function beforeRender()
{
$this->layout = 'Admin.default';
}
As for the help, it is a pleasure to help... :)
from admin.
Tried using that code as well just now, unfortunately it seems to have had no effect.
Thank you for taking the time to replicate it whenever you can, no rush :)
from admin.
Any updates with this? :)
from admin.
i have the same issue, any suggestion?
from admin.
Hey @mtatarau,
I've been waiting for a reply for months on this, as you can see, and have given up on the hope of getting one! Although perhaps with you having the same issue we will get some more feedback.
I couldn't find a fix to this myself, if I stumble upon anything though I'll be sure to let you know.
from admin.
In order to help please provide more details, as I'm unable to replicate it from this end and hence a bit clueless. Share any console errors you get?
from admin.
i use cakestrap template, and i can't set the Admin.default template. I use $this->layout = 'Admin.defaultp' but plugin use same layout with cakestrap
from admin.
simple fix
in AppController.php
if ($this->params['plugin'] == 'admin') {
$this->plugin = "Admin";
$this->layout = "Admin.default";
$this->theme = "";
}
in Admin.layout change bootstrap patch, is wrong
can use : netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css
from admin.
I am having the same issue. I following all of the solutions recommended to no avail. Any help on this would be appreciated.
from admin.
put an screenshot from admin page
from admin.
I got it working, not really sure how but i will post what i did.
- I downloaded BootstrapCake from here https://github.com/visionred/BootstrapCake
- Copied the css and js files and from Bootstrapcake and pasted them in the webroot folder of the admin plugin
- I then called the files in the layouts/deafult.ctp file.
from admin.
Finally managed to get this to work correctly!
Thanks for all the solutions, especially @mtatarau's which made it work pretty much perfectly!
from admin.
Related Issues (20)
- Change user password HOT 1
- Changing the View elements HOT 2
- Bootstrap CSS link is incorrect
- problem with uploading files HOT 4
- Logout problem
- Error when add new users HOT 2
- how can upload PDF file HOT 2
- Checkbox and Combobox
- navbar is returning empty forever HOT 1
- Conditions are not considered in admin panel. HOT 1
- Error: AdminController could not be found. HOT 1
- Different Area for different Group
- Admin layout is not working
- Regarding setup of Admin Panel HOT 3
- Issue when: App model -> hasMany -> plugin model
- Collision with debug_kit plugin
- Incompatible with Plugins Behavior HOT 1
- Table for model was not found in datasource default. HOT 9
- Error: Call to a member function check() on a non-object HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from admin.