"CSS Parser" Error Messages

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
TA08
Propeller Head
Posts: 43
Joined: Wed May 20, 2009 4:41 am

"CSS Parser" Error Messages

Post by TA08 »

Hi,

I have recently upgraded from Flare v5 to 6 using an existing project. When I try to generate various outputs using v6, I get a "CSS Parser" error message which did not occur in v5. Looking on the internet it appears that v6 is more strict re stylesheet validation but the message displayed is too generic for me to understand where on the stylesheet that the font style needs to be corrected. Has anyone else encounter this problem / can help me resolve this problem? I have logged this with the Tech Support but am still awaiting a response :-(

Error Message displayed in MadCap Flare V6 dialog box:
"Internal error: CSS Parser: Line:1. Char:23. Invalid token (:)(tokens=font-style: font-weight: normal;)"


Thanks in advance


Using Madcap Flare v6
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: "CSS Parser" Error Messages

Post by LTinker68 »

TA08 wrote:"Internal error: CSS Parser: Line:1. Char:23. Invalid token (:)(tokens=font-style: font-weight: normal;)"
There's no number after the font-style in that message, which is probably what's causing the problem. You could do a find in Flare in the stylesheet to look for that line.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
TA08
Propeller Head
Posts: 43
Joined: Wed May 20, 2009 4:41 am

Re: "CSS Parser" Error Messages

Post by TA08 »

Thanks for the response Lisa.

I've tried doing a search on the CSS for that tag in Flare and other Text Editors but unfortunately nothing has come back in the search.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: "CSS Parser" Error Messages

Post by LTinker68 »

Actually, it might not be in a stylesheet. Did you search the entire project and did you specify the find to look in the source code for topics? It might be an inline style in a topic that's causing the problem.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
TA08
Propeller Head
Posts: 43
Joined: Wed May 20, 2009 4:41 am

Re: "CSS Parser" Error Messages

Post by TA08 »

No I didn't search the entire project just the stylesheet that I was using and some of the default MadCap stylesheets just in case there was some styles in there. I will try searching the entire project & see if anything comes back in the results.

Tech Support have been in touch, so hopefully they will be able to point me in the right direction. If they provide me with a solution I will post the response.

Thanks
Using Flare v9.1.2
livetoski
Sr. Propeller Head
Posts: 135
Joined: Thu Aug 30, 2007 7:10 am
Location: Ottawa

Re: "CSS Parser" Error Messages

Post by livetoski »

Did you ever get a response?

I have been having the same error, except with no details, i.e. Line: 0. Char:0. Missing indentifier (property) 4 lines of this, Subsystem lists CSS Parser.

At the same time I am unable to keep titles with images, which was a new thing in the new project. Not sure if they are related.

To test if it is the CSS, I copied an old stylesheet that works still in the old project into the new project, and got the same messages in the new project and the images (img.screenshot) pop to the next page without the p.screenshot, but the formatting is identical and it all works fine in the previous project. So it's something in the project. Both are Flare 6.1.

I am going to test again today (Flare is spooky sometimes, and yesterday I was on a vpn) and search for something in my project. I sort of doubt that it is coincidence that functionality that I need (page-break-before: avoid) should work in one project with a style sheet and not in another with the same style sheet.
I get the same parser errors in one project, regardless of stylesheet?
Thanks for any help anyone can give.
Linda
TA08
Propeller Head
Posts: 43
Joined: Wed May 20, 2009 4:41 am

Re: "CSS Parser" Error Messages

Post by TA08 »

I have a Maintenance Plan with MadCap so they had to come back to me with a solution (after much e-mail ping pong).

The problem was that I upgraded from an older version of Flare to the latest version (at the time). The latest version had more stricter CSS compliance validation which threw errors in some of my topics which didn't conform to these new standards.

For example: In one of my topics the coding was: style="font-style: font-weight: normal;"> which did not have the font type. I removed the font-style i.e. it should be style="font-weight: normal;">. When I saved my topic and generated a new build, it resolved this issue.

I did log a feature suggestion regarding these very poor error messages. The error messages displayed were NOT descriptive enough to ascertain exactly what the problem was / how to fix and XML syntax errors are really hard to identify. I would really suggest you do the same.

Hope this helps :D ...
Using Flare v9.1.2
livetoski
Sr. Propeller Head
Posts: 135
Joined: Thu Aug 30, 2007 7:10 am
Location: Ottawa

Re: "CSS Parser" Error Messages

Post by livetoski »

Before I noticed your reply, I found the coding issue that was causing the 4 parser errors. I had a look at the report for the build in edit plus and it identified the exact problem. I compared the code of the topic from the new project to the old project and saw my problem: a missing semi-colon. I had been trying to clean up my tables and prevent them from being stuck to the left, so deleting by HAND all the margin-left: 0 (which forced the margin to be left, no matter what I did) and I screwed up and left out a semi-colon. However, this did not solve my keepwithnext issue. SAdly.

<table class="TableStyle_Basic" style="mc-table-style: url('../Resources/Tablestyles/basic.css');" cellspacing="0">

Thanks for responding. Linda
CatVancouver
Propeller Head
Posts: 13
Joined: Wed Oct 26, 2011 1:20 pm

Re: "CSS Parser" Error Messages

Post by CatVancouver »

Thanks for this topic everyone! :) This just happened in a very old project that we ported over from FM last year. Most of the files are clean, but one file had major errors in it. When it compiled, I kept seeing:

CSS Parser: Line: 1. Char: 4. Missing colon (:)(tokens=Bold)

With the tips on here, I looked at the file in the internal text editor mode & determined that there were some old css code (not compliant with new CSS) entries.
The code was for 'bold' items but they didn't show up as bold.
Finally, because it was a sizable file, I copied it into the The W3C CSS Validation Service (text editor area).
This told me the line number of the old 'bold' coding. Once I removed that, it worked properly.

As I am reconfiguring a bunch of these old files, it is great to know how to solve the problems of ancient css code from FrameMaker causing problems in the newer Flare (8.1). :flare:
rmatthewfoster
Jr. Propeller Head
Posts: 1
Joined: Fri Oct 07, 2016 4:17 am

Re: "CSS Parser" Error Messages

Post by rmatthewfoster »

Open the topic in VS Code.
In VS Code, click View > Problems to find code errors.
Post Reply