Giter Club home page Giter Club logo

Comments (18)

yusuf avatar yusuf commented on August 22, 2024

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.

DuncanLewis avatar DuncanLewis commented on August 22, 2024

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.

yusuf avatar yusuf commented on August 22, 2024

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.

DuncanLewis avatar DuncanLewis commented on August 22, 2024

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.

yusuf avatar yusuf commented on August 22, 2024

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.

DuncanLewis avatar DuncanLewis commented on August 22, 2024

Just tried that again for you, still no change with that :(

Thank you again for all your help, really do appreciate it :)

from admin.

yusuf avatar yusuf commented on August 22, 2024

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.

DuncanLewis avatar DuncanLewis commented on August 22, 2024

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.

DuncanLewis avatar DuncanLewis commented on August 22, 2024

Any updates with this? :)

from admin.

mtatarau avatar mtatarau commented on August 22, 2024

i have the same issue, any suggestion?

from admin.

DuncanLewis avatar DuncanLewis commented on August 22, 2024

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.

yusuf avatar yusuf commented on August 22, 2024

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.

mtatarau avatar mtatarau commented on August 22, 2024

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.

mtatarau avatar mtatarau commented on August 22, 2024

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.

lucienjarrett avatar lucienjarrett commented on August 22, 2024

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.

mtatarau avatar mtatarau commented on August 22, 2024

put an screenshot from admin page

from admin.

lucienjarrett avatar lucienjarrett commented on August 22, 2024

I got it working, not really sure how but i will post what i did.

  1. I downloaded BootstrapCake from here https://github.com/visionred/BootstrapCake
  2. Copied the css and js files and from Bootstrapcake and pasted them in the webroot folder of the admin plugin
  3. I then called the files in the layouts/deafult.ctp file.

from admin.

DuncanLewis avatar DuncanLewis commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.