Unexpected token error when saving target text

Hello,

I am receiving the error "Failure to save target content: "" is an unexpected token. The expected token is ";". Line 1, position 420." So far specifically in PPTX files.

I have done some fairly extensive testing to localize the error and it would seem to be related to a font name with & in its name. Is this possible? Is this a bug that SDL is aware of?
Is there a known workaround? It is not particularly feasible to reformat large PPTX files following target conversion, especially as in order to restore original formatting editing each individual text box is required.

Any input would be helpful, though I have already viewed the two other threads here with a related error.

Thank you!

Heather

  • Hi Heather,

    It's possible... I reproduced the issue so will report it tomorrow and see whether it's already logged. It looks as though the ampersand is doubled up in the sdlxliff.

    I also found a way to resolve it that may work for you. Unzip the original source powerpoint file and then replace the font name with a name that doesn't have the ampersand. I did this in these files:

    .. \docProps\app.xml
    .. \ppt\slides\slide1.xml

    So you may have to do this for all the slides that are used (I only had one slide in my file), but if you have a decent text editor you can probably do this across all your files in one go.

    Once replaced just zip the files/folders back up and rename as pptx. Than worked for me.

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Hi Heather,

    I can confirm this is logged with our reference LTB-98 and in the meantime I also have an even easier way to resolve it as opposed to the complicated method I suggested above.  Fasil Aziz (faziz) showed me a feature in powerpoint I wasn't aware of... replace fonts:

    You'll see this on the right of your toolbar in the "Editing" group of the "Home" ribbon.  Just seletc the font you want to replace and pick a replacement that is not used in the file yet.  It's easy to find one as the "Replace:" dropdown lists all the fonts in the file.  So here I selected the one I created with an & in the font name, and then selected one that wasn't in the file:

    Once you finish the translation you can reverse it and put the font back.  So it is inconvenient to have to do this at all, but at least it's only a couple of clicks for the whole file.

    Hope that helps.

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Hi,

    I encountered a similar issue in Studio 2015R2 build 12.2.5195.7, released in October. The reporting of this bug by Heather was in August.

    Just like Heather, it took extensive testing to find that an & character in the font name was the reason the target pptx could not be saved. I was able to export the target by first replacing the single escaped versions "&" with the double escaped variant & in the SDLXLIFF.

    Lennart