PHP7 and overlay window for the basket

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)
trimble
Posts: 0
Joined: 01 Jan 1970, 00:00

PHP7 and overlay window for the basket

Post by trimble » 06 Mar 2016, 16:27

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

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

Re: PHP7 and overlay window for the basket

Post by aimeos » 06 Mar 2016, 16:43

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?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

trimble
Posts: 0
Joined: 01 Jan 1970, 00:00

Re: PHP7 and overlay window for the basket

Post by trimble » 07 Mar 2016, 10:57

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
Attachments
error_messages1.png
error_messages1.png (6.38 KiB) Viewed 1734 times

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

Re: PHP7 and overlay window for the basket

Post by aimeos » 07 Mar 2016, 12:53

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

trimble
Posts: 0
Joined: 01 Jan 1970, 00:00

Re: PHP7 and overlay window for the basket

Post by trimble » 07 Mar 2016, 14:41

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>

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

Re: PHP7 and overlay window for the basket

Post by aimeos » 07 Mar 2016, 15:45

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

trimble
Posts: 0
Joined: 01 Jan 1970, 00:00

Re: PHP7 and overlay window for the basket

Post by trimble » 07 Mar 2016, 18:51

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 :)

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

Re: PHP7 and overlay window for the basket

Post by aimeos » 07 Mar 2016, 22:19

You should open a bug report for the bootstrap package :-)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

trimble
Posts: 0
Joined: 01 Jan 1970, 00:00

Re: PHP7 and overlay window for the basket

Post by trimble » 08 Mar 2016, 12:36

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
Attachments
error_messages.png
error_messages.png (8.84 KiB) Viewed 1711 times

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

Re: PHP7 and overlay window for the basket

Post by aimeos » 08 Mar 2016, 12:45

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply