Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#2014 by swpierce
01 Nov 2015, 13:25
I've just installed the Laravel package. Everything seems to be running. I can access the storefront just fine. I'm having a problem with the admin interface, though.

The admin page will load, and I can click on all of the tabs (except Catalog - that is grayed out) but I can't see any data. I only get a box in the middle of the screen that says "Loading..."

Can anyone tell me where I should look to fix that?

Thanks!
#2015 by aimeos
01 Nov 2015, 13:37
swpierce wrote:The admin page will load, and I can click on all of the tabs (except Catalog - that is grayed out) but I can't see any data. I only get a box in the middle of the screen that says "Loading..."


Might be due to a HTTP 500 error. If you have Chrome or Firefox, please have a look into the developer tools at the requests sent and responses received. You should also look at the error log of your web server and if anything is logged into the madmin_log table.
#2016 by swpierce
02 Nov 2015, 00:55
Thanks! I'm not sure if it helped or messed me up, though.

I checked everything you mentioned - server error log was empty. madmin_log table was empty. Nothing unusual in the developer tools - no errors or anything. I checked storage/logs/laravel.log and found nothing useful.

So I decided to reinstall.

The admin problem still exists, and now the storefront is giving me just a blank page. I still get no errors anywhere that I can find


The storefront now gives me blank screens and the Admin interface still has the same problem I mentioned above.
#2017 by swpierce
02 Nov 2015, 00:57
Fixed the blank page issue - storefront working again. Still unable to access to admin pages. Anywhere else I might look for an error?
#2018 by aimeos
02 Nov 2015, 09:05
swpierce wrote:Fixed the blank page issue - storefront working again. Still unable to access to admin pages. Anywhere else I might look for an error?


What was the error that caused the problem in the front-end?
Did you've checked the XHR requests that the admin interface is sending to the server and their response codes?
#2019 by swpierce
02 Nov 2015, 15:11
The only error I see is a JSON decode error:

Code: Select allUncaught SyntaxError: Unexpected token <
     Ext.util.JSON.doDecode @ file:4853
     (anonymous function) @ file:4972
     Ext.ux.direct.JsonRpcProvider.Ext.extend.onData @ file:53705
     Ext.extend.handleResponse @ file:4684
     f @ file:21
     m @ file:21
     (anonymous function) @ file:21
#2020 by swpierce
02 Nov 2015, 15:13
The storefront blank page was a stupid error from staying up too late. I put the template stuff into welcome.blade.php instead of app.blade.php - once I put it in the correct file, the storefront worked again :|
#2021 by aimeos
02 Nov 2015, 15:30
swpierce wrote:The only error I see is a JSON decode error:


Can you post the request and response of the XHR call that caused the JSON decode error?
#2022 by swpierce
02 Nov 2015, 23:42
If I look at last error, I see this:

Code: Select all(<br />
<b>Deprecated</b>:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent in <b>Unknown</b> on line <b>0</b><br />
[{"jsonrpc":"2.0","result":{"items":[{"product.type.id":"1","product.type.siteid":1,"product.type.ctime":"2015-11-0


The rest of the jsonrpc is in there but I cut it off for sake of brevity since I'm guessing the stuff above the json is causing the error?

Edit: I changed php.ini to set always_populate_raw_post_data = -1

The json decode problem went away. I instead get the following error now:

Code: Select allUncaught SyntaxError: Unexpected token <                  admin:1


admin:1 is
Code: Select all<!DOCTYPE html>
#2023 by aimeos
02 Nov 2015, 23:58
swpierce wrote:<b>Deprecated</b>: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in <b>Unknown</b> on line <b>0</b><br />


The HTTP_RAW_POST_DATA setting is the cause and the remedy is included: Please set in your php.ini:
Code: Select allalways_populate_raw_post_data=-1

or in your .htaccess file:
Code: Select allphp_value always_populate_raw_post_data -1

Here's a good explanation what's going wrong:
https://www.bram.us/2014/10/26/php-5-6-automatically-populating-http_raw_post_data-is-deprecated-and-will-be-removed-in-a-future-version/