0

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.

asked May 20, 2019 at 20:27

1 Answer 1

0

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')"

answered May 20, 2019 at 21:10
4
  • 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-align Commented May 20, 2019 at 22:13
  • I corrected my example. Also domain.name.com is your website address. You did that part? Commented 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/…)" Commented 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? Thanks Commented May 22, 2019 at 7:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.