Page 1 of 2
PHP7 and overlay window for the basket
Posted: 06 Mar 2016, 16:27
by trimble
Hi,
I'm using TYPO3 v7.6.4 and aimeos v16.1.2. With PHP 5.6 everything is fine. With PHP 7.0 the overlay window for the basket is opened but remains empty. Do I miss something?
Regards
trimble
Re: PHP7 and overlay window for the basket
Posted: 06 Mar 2016, 16:43
by aimeos
At aimeos.com, it runs quite nicely with PHP 7:
https://aimeos.com/support/
Can you have a look into the Apache error.log file and open the web console in your browser if there are any errors displayed?
Re: PHP7 and overlay window for the basket
Posted: 07 Mar 2016, 10:57
by trimble
Good morning,
I tried to check the situation with firebug and got the following error messages (error_messages1).
There is only one situation, when the windows opens correctly: The stock is empty.
Regards
trimble
Re: PHP7 and overlay window for the basket
Posted: 07 Mar 2016, 12:53
by aimeos
Could you please have a look into the response of the "count" and "stock" requests? Seems like HTML is returned which may be caused by an exception caught by TYPO3.
Re: PHP7 and overlay window for the basket
Posted: 07 Mar 2016, 14:41
by trimble
Here is the response of the count request. I deleted the empty lines
Code: Select all
<div id="c14" class="frame default">
<h1 class="">
Counts
</h1>
// <!--
var categoryCounts = {"1":"6","2":"3","3":"5","4":"2","5":"2","8":"1"};
$( ".catalog-filter-count li.cat-item" ).each( function( index, item ) {
var itemId = $(item).data( "id" );
$("> a.cat-item", item).append( function() {
if( categoryCounts[itemId] ) {
return ' <span class="cat-count">' + categoryCounts[itemId] + '</span>';
}
$(item).addClass( 'disabled' );
});
});
// -->// <!--
var attributeCounts = {};
$( ".catalog-filter-attribute .attribute-lists li.attr-item" ).each( function( index, item ) {
$(item).append( function() {
var itemId = $(this).data( "id" );
if( attributeCounts[itemId] ) {
var node = document.createElement( 'span' );
node.appendChild( document.createTextNode( attributeCounts[itemId] ) );
$(node).addClass( 'attr-count' );
return node;
}
$(this).addClass( 'disabled' );
});
});
// -->
</div>
Re: PHP7 and overlay window for the basket
Posted: 07 Mar 2016, 15:45
by aimeos
You've added a header and a frame in the plugin settings. Thus, TYPO3 renders the div and h1 tag and that causes a JS error.
Re: PHP7 and overlay window for the basket
Posted: 07 Mar 2016, 18:51
by trimble
I didn't add anything. I'm testing the new bootstrap_package v7, I guess that's where it comes from (
https://github.com/benjaminkott/bootstrap_package)
With ph 5.6 and bootstrap_package v7 I have the same error messages but that's no problem for the rendering of the overlay window.
Regards
trimble
------
15 min later:
I just ckecked it again with a reinstalled bootstrap_package 6.1.2. There aren't any errors
Re: PHP7 and overlay window for the basket
Posted: 07 Mar 2016, 22:19
by aimeos
You should open a bug report for the bootstrap package
Re: PHP7 and overlay window for the basket
Posted: 08 Mar 2016, 12:36
by trimble
bootstrap_package v7 released today. I'm curious abourt your experiences with it.
Just one more information:
with the extension sourceopt I could clean the FE code. As result I get same errors but another output 'return window.wrappedJSObject || window;'
and I get the error message:
<b>Fatal error</b>: Declaration of Aimeos\MShop\Service\Provider\Decorator\Base::__construct(Aimeos
\MShop\Service\Provider\Iface $provider, Aimeos\MShop\Context\Item\Iface $context, Aimeos\MShop\Service
\Item\Iface $serviceItem) must be compatible with Aimeos\MShop\Service\Provider\Factory\Iface::__construct
(Aimeos\MShop\Context\Item\Iface $context, Aimeos\MShop\Service\Item\Iface $serviceItem) in <b>/html
/typo3/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-core/lib/mshoplib/src/MShop/Service/Provider
/Decorator/Base.php</b> on line <b>247</b><br />
With php 5.6.3 the last error message about the fatal error is missing.
Regards
trimble
Re: PHP7 and overlay window for the basket
Posted: 08 Mar 2016, 12:45
by aimeos
trimble wrote:
with the extension sourceopt I could clean the FE code. As result I get same errors but another output 'return window.wrappedJSObject || window;'
It's better to fix the underlying problem than to try to work around it.
trimble wrote:
<b>Fatal error</b>: Declaration of Aimeos\MShop\Service\Provider\Decorator\Base::__construct) must be compatible with Aimeos\MShop\Service\Provider\Factory\Iface::__construct()
You need at least PHP 7.0.3 that fixes the problem:
https://bugs.php.net/bug.php?id=71248