Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Help - Site offline because of Custom CSS error Rate Topic   - - - - -

 
  • bart
  • Junior Member
  • Members
  • Join Date: 24-Jan 10
  • 73 posts

Posted 16 November 2013 - 12:36 PM #1

I currently have a live web site version 4.0.3

Unfortunately when adding some code to the Custom CSS area (via Use Themes -> Customize Theme) I forgot to add a closing bracket.

Now my web site is completely offline and shows the following error ...

Fatal error: Uncaught exception 'Exception' with message 'parse error: unclosed block' in /home/xxx/public_html/app/lib/other/lessphp/lessc.inc.php:2449 Stack trace: #0 /home/xxx/public_html/app/lib/other/lessphp/lessc.inc.php(1938): lessc_parser->parse('?// GRID variab...') #1 /home/xxx/public_html/app/lib/other/lessphp/lessc.inc.php(2085): lessc->compile('?// GRID variab...') #2 /home/xxx/public_html/app/Tygh/Less.php(84): lessc->parse('?// GRID variab...') #3 /home/adhocflo/public_html/app/functions/fn.common.php(5120): Tygh\Less->customCompile('?// GRID variab...', '/home/xxx/...', Array, '') #4 /home/xxx/public_html/app/functions/smarty_plugins/block.styles.php(50): fn_merge_styles(Array, '', '', Array) #5 /home/xxx/public_html/var/cache/templates/design/themes/basic/templates/c2eaf6b0d44f4e8582adda77554f87894f440b0d.tygh.styles.tpl.php(105): smarty_block_styles(Array, '?? <link typ...', Object(Smarty_Internal_Template), false) #6 /home/xxx/public_html/app/lib/other/smarty/s in /home/xxx/public_html/app/lib/other/lessphp/lessc.inc.php on line 2449

Does anyone know how I can resolve this as I can no longer access my site directly to use the template editor. I only have admin access.

Thanks
bart

 

Posted 16 November 2013 - 12:51 PM #2

First I'd start by downloading the V4.0.3 file package and overwriting the damages CSS file. At least that will get your site back up.

Elkhorn Graphics LLC
Cs-Cart 4.11.2


 
  • bart
  • Junior Member
  • Members
  • Join Date: 24-Jan 10
  • 73 posts

Posted 16 November 2013 - 01:08 PM #3

Thanks

.... but which "overwriting the damages CSS file" am I overwriting.
If I knew which CSS file to look for and where via ADMIN Id just go and remove the code I wrongly added.

bart

 
  • bart
  • Junior Member
  • Members
  • Join Date: 24-Jan 10
  • 73 posts

Posted 16 November 2013 - 01:14 PM #4

I also tried removing 4.0.3 upgrade back to 4.0.2 but still have same error.

 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4925 posts

Posted 16 November 2013 - 02:40 PM #5

Thanks

.... but which "overwriting the damages CSS file" am I overwriting.
If I knew which CSS file to look for and where via ADMIN Id just go and remove the code I wrongly added.

bart


He means upload the complete new css file..save the olad amended one as soemthing else then you can still fix it and put it back when you are ready

John

Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2


 
  • bart
  • Junior Member
  • Members
  • Join Date: 24-Jan 10
  • 73 posts

Posted 16 November 2013 - 07:15 PM #6

Yes ... but how do I know which CSS file I should be replacing. I have just downloaded CS Cart v4.0.3 to my hard drive and there are 143 CSS files.

bart

Attached Thumbnails

  • Snap1.jpg


 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4925 posts

Posted 16 November 2013 - 07:50 PM #7

In design/themes/basic/css replace the .css files one by one. After each one ...clear the cache in site and browser each time and see if it fixes it.
What particular part of the site were you editing at the time, this may give you a clue as to which .css file to do first.
remember to save copies of all the ones on the site first
John

Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2


 
  • bart
  • Junior Member
  • Members
  • Join Date: 24-Jan 10
  • 73 posts

Posted 16 November 2013 - 07:59 PM #8

Thanks John.

I added code via the theme editor (see attachment) but forgot to add a closing }
Its for this reason I dont know which .css file is affected.

bart

Attached Thumbnails

  • Snap5.jpg


 

Posted 16 November 2013 - 09:18 PM #9

Do you have FTP access?

If so, FTP to the following directory:
var/cache/misc/statics/design/themes/basic/css/ and look for the standalone css file that is stored there.

Download it and open it in a code editor (not notepad, or wordpad) like notepad ++ and scroll all the way down to the bottom.

Remove the custom css code that you added through the theme editor (or add the closing curly brace ( }) and save it.

Upload it back to overwrite the existing standalone file.

Reload your page in your browser and go back into theme Editor and add the closing curly brace and save changes. Clear your cache

Jeremy
Requin Creative Group
CS-Cart License | CS-Cart Addons


 
  • bart
  • Junior Member
  • Members
  • Join Date: 24-Jan 10
  • 73 posts

Posted 17 November 2013 - 12:20 AM #10

Hi requincreative

Thanks for your detailed reply.

Using FTP i found the following directory
www/var/cache/misc/statics/design/backend/css and the standalone css file stored there (see attachments)

But unfortunately I did not find the custom css code at the bottom of the file (nor when I did a search)

bart

Attached Thumbnails

  • Snap6.jpg
  • Snap7.jpg


 

Posted 17 November 2013 - 02:42 AM #11

Is it the frontend or backend that is inaccessible?

If frontend then you need to edit the var/cache/misc/statics/design/themes/basic/css/standalone.xxxxxxxxxxxxxxxxxxxx.css file and not the the file in the backend cache

Jeremy
Requin Creative Group
CS-Cart License | CS-Cart Addons


 
  • Pbraz
  • Advanced Member
  • Members
  • Join Date: 26-Aug 12
  • 118 posts

Posted 17 November 2013 - 02:51 AM #12

I did exactly the same thing, added some custom CSS via the theme editor and this crashed my site and the admin so I could not get back in to remove the offending CSS.I think I just had a ";" in the wrong spot at the end of a line after the "}". To fix I just found the CSS file where this custom code is added and deleted it and put the file back on the server.
Paul
www.gohorse.com.au
Horse Rugs Store

 
  • Pbraz
  • Advanced Member
  • Members
  • Join Date: 26-Aug 12
  • 118 posts

Posted 17 November 2013 - 03:12 AM #13

/var/cache/misc/statics/design/themes/basic_clone/css/addons/discussion/scheme.less-2.css this is where I found my custom css that needed to be deleted, the "basic_clone" path may differ if you have a different theme name. Also under Template editor - CSS debug mode was turned off so I could see the actual css file using Firefox Inspect Element (right click). May also need to clear the cache.
Paul
www.gohorse.com.au
Horse Rugs Store

 
  • bart
  • Junior Member
  • Members
  • Join Date: 24-Jan 10
  • 73 posts

Posted 18 November 2013 - 12:22 PM #14

Getting ready to throw laptop out of window ... still havent resolved this

Is it the frontend or backend that is inaccessible?

If frontend then you need to edit the var/cache/misc/statics/design/themes/basic/css/standalone.xxxxxxxxxxxxxxxxxxxx.css file and not the the file in the backend cache


I cant access the frontend via web browser. CS cart backend (admin) is ok.

When using ftp i dont have this folder
... var/cache/misc/statics/design/themes/

Only this
public_html/var/cache/misc/statics/design/backend/css/standalone.xxxxxxxxxxxxxxxxxxxx.css


/var/cache/misc/statics/design/themes/basic_clone/css/addons/discussion/scheme.less-2.css this is where I found my custom css that needed to be deleted, the "basic_clone" path may differ if you have a different theme name. Also under Template editor - CSS debug mode was turned off so I could see the actual css file using Firefox Inspect Element (right click). May also need to clear the cache.


Did you find the bad .css file via FTP ... or using cscart admin?
And did the wrong code you added appear at the bottom of the .css file?

Thanks
bart

 
  • Pbraz
  • Advanced Member
  • Members
  • Join Date: 26-Aug 12
  • 118 posts

Posted 20 November 2013 - 10:35 AM #15

via FTP and the added code was at the bottom
Paul
www.gohorse.com.au
Horse Rugs Store

 
  • bart
  • Junior Member
  • Members
  • Join Date: 24-Jan 10
  • 73 posts

Posted 20 November 2013 - 11:09 AM #16

Thanks Pbraz and requincreative,

I was able to resolve this by 'cloning a theme' via CS Cart admin. Once I did that I was able to access CS Cart theme editor via firefox and simply deleted the theme that contained the dodgy piece of CCS code. I then added correct code to a new theme vis CSS custom.

bart :mrgreen:

 
  • Pbraz
  • Advanced Member
  • Members
  • Join Date: 26-Aug 12
  • 118 posts

Posted 21 November 2013 - 10:07 AM #17

The error should be trapped in software for minor syntax problems and not crash the system completely. Many people will get caught by this and have problems recovering. An opportunity for CScart to make their software more robust ?
Paul
www.gohorse.com.au
Horse Rugs Store

 
  • jordenaleman
  • Member
  • Authorized Reseller
  • Join Date: 05-Nov 11
  • 27 posts

Posted 04 February 2014 - 03:32 PM #18

check the presets/data folder in your theme, the custom css is in your [preset].css file

jorden
Jorden
Eyesi Webshops
www.eyesiwebwinkels.com