I have 1.9.0.3 Magento website, everything was fine, website wasnt edited in a year and when I tried to edit some existing static block and save or save and continue editing I am returned in CMS/Static Blocks panel and no changes are made. It allows me to create new static block, but when I copy paste code from existing old block same happened. What I noticed when playing with blocks when I copy/paste code from existing block in new block for example:
<div id="banner-slider-demo-2-new" class="owl-carousel owl-theme owl-middle-narrow owl-banner-carousel">
<div class="item" style="background:url({{media url="wysiwyg/porto/homepage/slider/02/13_new.jpg"}})
Cant save the new created block. When I remove word "style" everything is ok and block is saved. It happen with all lines with "style". Code is not proper without "style" but block is saved. I flushed everything, deleted cache, same happened. In system.log I found error that repeats 20 times per day in last 12 months:
2019年05月20日T16:27:25+00:00 ERR (3): Warning: Invalid argument supplied for foreach() in /home/fedorsoaps/public_html/app/code/local/Smartwave/Socialfeeds/Helper/Data.php on line 79
And, line 79 in Data.php is:
79 foreach ($doc->getElementsByTagName('ul')->item(0)->childNodes as $child) {
$raw = $doc->saveXML($child);
$li = preg_replace("/<li[^>]+\>/i", "", $raw);
$peopleList[$i] = preg_replace("/<\/li>/i", "", $li);
$i++;
Meanwhile website frontend is working normally but I cant make any changes. I am not coder, just basic Magento installer, thanks for any help.
1 Answer 1
Have you tried without the smart tag (or whatever magento calls it). So..
secure
style="background:url('https://www.domain.name.com/media/wysiwyg/porto/homepage/slider/02/13_new.jpg')"
or non-secure
style="background:url('http://www.domain.name.com/media/wysiwyg/porto/homepage/slider/02/13_new.jpg')"
-
Still cant "Save and Continue Edit", push me back in CMS/Static Blocks menu when tried . This line Block wont save: style="background:url("domain.name.com/media/wysiwyg/porto/homepage/slider/02/…" This line block saved: ="background:url("domain.name.com/media/wysiwyg/porto/homepage/slider/02/…" Also, with other lines with "style" mentioned. Not saved Block: <p style="text-align:right;"><span style="color: #fff; vertical-align Saved Block: <p ="text-align:right;"><span style="color: #fff; vertical-alignkulasklan– kulasklan2019年05月20日 22:13:58 +00:00Commented May 20, 2019 at 22:13
-
I corrected my example. Also domain.name.com is your website address. You did that part?Dominic Pixie– Dominic Pixie2019年05月20日 22:45:02 +00:00Commented May 20, 2019 at 22:45
-
Thanks for your effort. Yes, I put my website name instead of domain.name.com and use corrected example, still same.. Not saved: style="background:url('domain.name.com/media/wysiwyg/porto/homepage/slider/02/…)" Saved Block: ="background:url('domain.name.com/media/wysiwyg/porto/homepage/slider/02/…)"kulasklan– kulasklan2019年05月20日 23:43:37 +00:00Commented May 20, 2019 at 23:43
-
Ok, I didnt found solution for this, can someone tell me in what file/folder I can find static blocks in File Manager and can I edit them directly, without going trough Admin panel? Thankskulasklan– kulasklan2019年05月22日 07:46:53 +00:00Commented May 22, 2019 at 7:46