[email protected] Posted April 26, 2013 Share Posted April 26, 2013 I'm busy creating an Admin module and extending the ModuleAdminController class. I'm trying to add some CSS by using the following: class AdminPrintspecJobsController extends ModuleAdminController { public function setMedia() { parent::setMedia(); $this->addCss(_MODULE_DIR_ . $this->module->name . "/css/printspec_table.css"); } // ... } When I refresh my admin page, in Chrome, the Network panel indicates the file is added to the DOM, but it fails with an HTTP 404, not found error. My folder structure looks as follows: . ├── AdminTab.gif ├── config.xml ├── controllers │ └── admin │ ├── AdminPrintspecJobs.php │ └── AdminTab.php ├── css │ └── printspec_table.css ├── printspec.php └── views └── templates └── admin └── printspec_jobs └── jobs.tpl What am I doing wrong here? Link to comment Share on other sites More sharing options...
[email protected] Posted April 26, 2013 Author Share Posted April 26, 2013 Let me rephrase the question... I want to view a css file, directly in my browser, the file is located in: .../myprestashop/modules/printspec/css/printspec.css I'm trying to see if it loads by visiting: http://myprestashop.com/modules/printspec/css/printspec.css but getting a 404. How do I see the CSS file? If I can do this, I can figure the rest out. Link to comment Share on other sites More sharing options...
[email protected] Posted April 26, 2013 Author Share Posted April 26, 2013 Narrowed the problem down to .htaccess. If I empty it, I can access the CSS in the browser with: http://store.personera.dev/modules/printspec/css/printspec.css, which works for other modules, without the modification. No idea how to fix. Link to comment Share on other sites More sharing options...
[email protected] Posted April 26, 2013 Author Share Posted April 26, 2013 Issue fixed. I turned Friendly URLs off and on, and the problem was sorted. Link to comment Share on other sites More sharing options...
Recommended Posts