JS-Error on Aimeos Catalog Search Plugin

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
tenkraD
Advanced
Posts: 110
Joined: 25 Jul 2017, 08:38

JS-Error on Aimeos Catalog Search Plugin

Post by tenkraD » 20 Apr 2019, 11:31

Hello Admin,

I use the catalog search Plugin instead of the catalog Filter Plugin, but i saw it generates an JS-Error when usign this Plugin.

Error in Google Chrome: "Uncaught SyntaxError: Unexpected token < "
And in Internet Explorer: " SCRIPT1002: SCRIPT1002: Syntax error"

I found out that The catalog search Plugin loads a JS Script in the <head> which has html in it and this leads to the error.

Code: Select all

 <script type="text/javascript" defer="defer" src="/website/localesite/?type=191351524"></script>
If i use now the catalog Filter Plugin it loads a JS Script in the <head> which has JS-Code in it for the Filter and generates no Error

Code: Select all

 <script type="text/javascript" defer="defer" src="/website/localesite/counts/?type=191351524"></script>
I think in the script src for the catalog search plugin the counts is missing.
Will this be fixed soon?

Thank you very much.

Aimeos 18.10.7 / Typo3 8.7.24

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: JS-Error on Aimeos Catalog Search Plugin

Post by aimeos » 21 Apr 2019, 15:11

Did you forget to configure the page for the suggestions in the flexform?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

tenkraD
Advanced
Posts: 110
Joined: 25 Jul 2017, 08:38

Re: JS-Error on Aimeos Catalog Search Plugin

Post by tenkraD » 23 Apr 2019, 08:40

No i didnt forget that.

But i saw now under catalog search it has no options to select counts page.
Under catalog filter plugin the counts page can be selected.

Maybe this is missing under catalog search plugin?

Thanks
Attachments
catalog search plugin options.JPG
catalog search plugin options.JPG (44.47 KiB) Viewed 1739 times
catalog filter plugin options.JPG
catalog filter plugin options.JPG (38.79 KiB) Viewed 1739 times

tenkraD
Advanced
Posts: 110
Joined: 25 Jul 2017, 08:38

Re: JS-Error on Aimeos Catalog Search Plugin

Post by tenkraD » 23 Apr 2019, 09:55

OMG, found now a little dirty fix.
Change the catalog search plugin to catalog filter, insert the counts page, save the page in typo3.
Clear frontend and backend cache. View page, no error.
Change the catalog filter plugin back to catalog search, save the page and clear the caches - no errors anymore.

The script src tag is now displayed with the missing counts part.

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: JS-Error on Aimeos Catalog Search Plugin

Post by aimeos » 24 Apr 2019, 14:16

Better solution: Set this in the TSConfig field of your Catalog Search plugin:

Code: Select all

client.html.catalog.count.enable = 0
We've added a check so this won't be neccessary in new versions.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply