Jump to:

7938 Posts in 1541 Topics by 945 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » CSS Links not being added

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 940 Views
  • purplespider
    Avatar
    Community Member
    81 Posts

    CSS Links not being added Link to this post

    I am using a DOM Table to manage the testimonials on my client's website.

    I am having a problem with the CSS for the table not loading unless I refresh the CMS while on that page.

    When I click on the Testimonial page and then the Testimonials tab I see this:

    I need to press the refresh button in order for it to display correctly:

    Looking at the source code of the page before and after the refresh, I notice that the following lines appear after the refresh, but not before.

    <link rel="stylesheet" type="text/css" href="http://example.com/dataobject_manager/css/dataobject_manager.css?m=1285261264" />
    <link rel="stylesheet" type="text/css" href="http://example.com/dataobject_manager/css/facebox.css?m=1285261265" />
    <link rel="stylesheet" type="text/css" href="http://example.com/sapphire/css/TableListField.css?m=1286911092" />
    <link rel="stylesheet" type="text/css" href="http://example.com/sapphire/css/ComplexTableField.css?m=1286911088" />

    So for some reason, unless the CMS is loaded at the same time as the page with the DOM table on it, the CSS for the table is not inserted.

    I'm using SilverStripe 2.4.2.

    Any ideas why this is happening?

    Thanks
    James

  • UncleCheese
    Avatar
    4085 Posts

    Re: CSS Links not being added Link to this post

    Wow, I have no idea. I've never experienced this problem. You have the directory correctly named "dataobject_manager"?

    --------------------
    SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

  • purplespider
    Avatar
    Community Member
    81 Posts

    Re: CSS Links not being added Link to this post

    Yep, the directory is correctly named. I can't see anything different in my code that should be interfering. Any ideas!?

  • SheaDawson
    Avatar
    Community Member
    45 Posts

    Re: CSS Links not being added Link to this post

    I had this problem... Thanks UncleCheese, renaming to "dataobject_manager" fixed it.

    Cheers!

  • purplespider
    Avatar
    Community Member
    81 Posts

    Re: CSS Links not being added Link to this post

    My directory is definitely called "dataobject_manager" (copied and pasted that), but I am still having this problem. I expect that having the wrong dir name just causes the CSS files not to be found, and therefore the styles do not display.

    However, as per my initial post, the problem I am seeing is the CSS files aren't even linked to in the HTML until the page is refreshed.

  • purplespider
    Avatar
    Community Member
    81 Posts

    Re: CSS Links not being added Link to this post

    After several hours of trial and error, I've finally found out what was causing this issue.

    One of my other controller php files, which was completely unrelated to the Testimonials, had 2 empty lines at the bottom of the file! I removed these and now the DOM table loads perfectly everytime!

    940 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.