Can't remove background image on a content block

Permalink
Hi,

A client has added a background image to a content block through Design > Set Block Styles > Background but now can't remove it again. When I go into the Background tab there's no thumnbail where the background image is set so I can't click on it to remove it, and using Reset isn't clearing it either. This has happened on two different content blocks. I've tried applying a new image as the background and removing it in the hope that this will reset it but no luck.

When viewing the source I see:

<div id="areaStyleColumn1Block21" class=" ccm-area-styles ccm-area-styles-a98" > 
<p>Normal text content is here.</p>
</div>


and the styles applied are:

#areaStyleColumn1Block21 {
background-image: url('/files/3713/0338/8167/disability_200-305.jpg');
background-repeat: no-repeat;
}


Has anyone else come across this before or any ideas how I can get rid of the background?

Thanks,
Ali

MrsSpringy
 
r1digital replied on at Permalink Reply
r1digital
If you are editing the page and click design on the C5 nav bar you should be able to get rid of it from there.
MrsSpringy replied on at Permalink Reply
MrsSpringy
That only gives me the options to change page template or theme, or am I missing something?

Thanks,
Ali
r1digital replied on at Permalink Reply
r1digital
Click on the block that's been edited already, and it the box that appears there should be a design option just before the custom template option.

-----Original Message-----
From: Concrete5 Community [mailto:discussions@concretecms.com]
Sent: 22 April 2011 23:09
To: info@r1creative.co.uk
Subject: Can't remove background image on a content block: Can't remove background image on a content block
cannonf700 replied on at Permalink Reply
cannonf700
If it's a simple text block - just delete the block and start over. You also might try clearing the cache via the dashboard.
MrsSpringy replied on at Permalink Reply
MrsSpringy
The strange thing is I've deleted the block, published the page and sure enough the block and background is gone, but when I go back into the page and add a brand new block in it's place the background comes back!
jordanlev replied on at Permalink Reply
jordanlev
I would try clearing the site cache (Dashboard -> Sitewide Settings, click the "Clear Cache" button).
If that doesn't work, also try clearing your browser's cache as well.
salmanhijazi replied on at Permalink Reply
From your dashboard, go the the file manager, and delete that image from your files.
TheRealSean replied on at Permalink Reply
TheRealSean
Deleting the image should stop it appearing but then wouldn't stop the css call, you would(in theory) just have a broken image link on your page.

I would attempt to go with the cache option its often the cause of bugs a gremlins for me
TheRealSean replied on at Permalink Reply
TheRealSean
Quick thought, have they added it through the scrapbook??

Maybe adding something there overrides the page default design bg?

I mean if they added a background when in the scrapbook using the design option there.
salmanhijazi replied on at Permalink Reply
it's a background, so no broken links appear. I had the same issue, solved now. as for the call, it's not hard coded. So i'm guessing its a programming bug. That the remove background function isn't doing it's job correctly.
TheRealSean replied on at Permalink Reply
TheRealSean
sorry I should clarify a css call to an image that does not exist will not pass the w3c validator.

If you are not to concerned about this then you have nothing to worry about a broken image link will no be displayed but the page would not pass for valid html/css
clocktower replied on at Permalink Reply
clocktower
I am also having this issue today. The behavior is exactly as you described:

1. I created a rule on the content block using Design > Set Block Styles > Background, and chose my image.
2. I decided I didn't want that image as the BG image of the block after all, and tried to clear the image. It no longer shows up in the Set Block Styles > Background tab.
3. However, the CSS rule remains, and I can not get rid of it through the C5 interface in any way. Deleting the block and adding another does not solve the issue.

The only thing I can thin of is A, delete the file through the file manager and deliver to my client CSS that does not validate (not at all my first choice), or monkey around in the DB tables and figure out where that style rule lives, and delete the record directly (also not my first choice).

This is obviously a troublesome bug in the system. It is CLEARLY meant to get rid of the background-image CSS rule, but it does not do so successfully.

I hope this gets fixed in the coming update.
clocktower replied on at Permalink Reply
clocktower
I was able to solve the problem with a "risky" workaround. I WOULD NOT recommend this solution to inexperienced DB users.

I chose to enter the database directly. The table in question is called "CustomStyleRules", and the field that contains the rules is called "css_serialized". Since I created 3 content blocks in that page, the system generated 3 records, one for each block. I chose to delete the 3 records that existed in my system. Nothing appears to have broken, and the background-image rule is no longer appearing on any of the blocks.

Kudos to the concrete5 team for structuring their databases so independently and naming them so clearly. Hope they add a "deleted" flag field in CustomStyleRules to remedy that bug we're dealing with.
jordanlev replied on at Permalink Reply
jordanlev
Glad you were able to figure this out. I suggest you file a bug report about it (along with all of these excellent details you discovered) so it will come to the attention of the core team:
http://www.concrete5.org/developers/bugs/5-4-1-1/...
clocktower replied on at Permalink Reply
clocktower
Thanks for the recommendation. I just finished filing the bug report, so if anyone is interested in confirming the bug, that would probably be useful to us all.

http://www.concrete5.org/developers/bugs/5-4-1-1/canand039t-remove-...