Troubles with "count" js file

Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules
Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
User avatar
rowild
Posts: 16
Joined: 16 Sep 2019, 12:40

Troubles with "count" js file

Post by rowild » 02 Oct 2019, 07:01

[TYPO3 9.5, aimeos 19.7, php 7.2]

Looking into the Chrome devtool, I see that there is an error:

Code: Select all

Uncaught SyntaxError: Unexpected token '<'
The content of the "count" script (which has no js-ending) is mainly Javascript, but it i wrapped in HTML code, which most likely is the reason for the error.

Reading through the "count" script, I assume that the script is coming from aimeos.
Currently, there is only a catalog list plugin implemented and active, nothing else (not even invisible).
Also, all compress and concatenate options are set to 0.

Is this a problem that in connected to aimeos?
If yes: how can I solve that?
If no: sorry for bothering!

Thank you!
Attachments
count.png
The "count" script that has no ending. HTML code wraps Javascript code.
count.png (241.45 KiB) Viewed 119 times
error-message-in-console.png
Error message in console
error-message-in-console.png (27.21 KiB) Viewed 119 times

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

Re: Troubles with "count" js file

Post by aimeos » 02 Oct 2019, 09:20

Make sure you use "No frame" in the "Appearance" tab -> "Frame" option of the plugin content element.
"Default" will add a <div> around the plugin output which makes JSON invalid.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
rowild
Posts: 16
Joined: 16 Sep 2019, 12:40

Re: Troubles with "count" js file

Post by rowild » 02 Oct 2019, 10:08

I thought about that, too, but "none" is actually the standard configuration:

Code: Select all

TCAdefaults.tt_content.frame_class = none
And just to make sure, I deleted and integrated the (only!) plugin manually once more, cleared and flushed all caches and also made sure via a look in the database that all frame_class fields are set to none. Also the trash bin was emptied.

But the console still throws that error.

The weird thing is that, if I put an <f:debug>... in the fluid template, all those debug informations will be part of the counts script, to (and therefore throw an error).

User avatar
rowild
Posts: 16
Joined: 16 Sep 2019, 12:40

Re: Troubles with "count" js file

Post by rowild » 06 Oct 2019, 11:33

BTW - having a frame class or not does not make any difference, if using the aimeos_dist.
(I assume I have some error in my own sitepackage extension.)

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

Re: Troubles with "count" js file

Post by aimeos » 07 Oct 2019, 08:53

You need to remove the div tags somehow:

Code: Select all

<div id="..." class="frame ..." ... >
Normally, they are only inserted if something else tan "Frame" -> "No frame" is used but there may be TS settings that overwrite that value.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply