Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

CSS Links not being added


Reply


6 Posts   963 Views

Avatar
purplespider

Community Member, 82 Posts

14 October 2010 at 5:10am

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

Avatar
UncleCheese

4086 Posts

14 October 2010 at 5:33am

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

Avatar
purplespider

Community Member, 82 Posts

14 October 2010 at 5:58am

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

Avatar
SheaDawson

Community Member, 46 Posts

20 October 2010 at 11:25am

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

Cheers!

Avatar
purplespider

Community Member, 82 Posts

20 October 2010 at 10:35pm

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.

Avatar
purplespider

Community Member, 82 Posts

19 March 2011 at 3:12am

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!