Page 1 of 1

Troubles with "count" js file

Posted: 02 Oct 2019, 07:01
by rowild
[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!

Re: Troubles with "count" js file

Posted: 02 Oct 2019, 09:20
by aimeos
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.

Re: Troubles with "count" js file

Posted: 02 Oct 2019, 10:08
by rowild
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).

Re: Troubles with "count" js file

Posted: 06 Oct 2019, 11:33
by rowild
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.)

Re: Troubles with "count" js file

Posted: 07 Oct 2019, 08:53
by aimeos
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.