Categories list don't show in the Admin

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
johnnuman
Posts: 5
Joined: 17 Jan 2021, 12:00

Categories list don't show in the Admin

Post by johnnuman » 17 Jan 2021, 12:26

Hi there,

I have a situation that has stumped me for last 2 days. Here is my setup.
Aimeos for Laravel : ^2020.07
Laravel: ^7.24
PHP: ^7.2.5
MySQL: 5.7
Server: IIS 8 on Windows Sever 2016
composer.jon.png
composer.jon.png (28.29 KiB) Viewed 954 times
My composer.json screenshot is attached.

I developed the website on my dev machine. It worked perfect. Now I need to move it to staging server. I copy over the Database and the PHP code, run composer update, run php artisan aimeos:setup and I have my website up and running on the staging server. See attached files
categories_load_fine_on_front_end.png
categories_load_fine_on_front_end.png (42.62 KiB) Viewed 954 times
and
catalog_loads_fine_on_dev_machine.png
catalog_loads_fine_on_dev_machine.png (18.72 KiB) Viewed 954 times
When going in admin panel on staging, the catalog page is empty. It does not load the tree of categories.
catalog_empty_on_server.png
catalog_empty_on_server.png (20.53 KiB) Viewed 954 times
On product edit page, on categories tab, the categories do not load in the dropdown either. I am pulling my hair out as I reach my wits end here.
I have repeated the process of uploading the website multiple times with same results. I even setup an empty fresh laravel setup and just added aimeos without any customization with demo data but the problem is same.
I have narrowed down the issue to the absence of ajax calls on categories page that load the catalog tree. On my dev machine I have 3 ajax calls when categories page is loading in admin panel
ajax_calls_work_fine_on_dev.png
ajax_calls_work_fine_on_dev.png (29.83 KiB) Viewed 954 times
But these ajax calls do not happen on the staging server. The code responsible for this call is in \ai-admin-jqadm\admin\jqadm\themes\catalog.js the function Aimeos.options.done() does not get called on the staging server. I have tried to figure out where it is being called from in the code but I want not successful. I need immediate assistance. The client is waiting for the demo since and I have already postponed things twice as I am unable to set things up on the staging server.

Your able guidance is highly appreciated. Thank you.

johnnuman
Posts: 5
Joined: 17 Jan 2021, 12:00

Re: Categories list don't show in the Admin

Post by johnnuman » 17 Jan 2021, 12:27

Adding more screenshots to support my point.
Attachments
no_ajax_call_on_staging.png
no_ajax_call_on_staging.png (13.9 KiB) Viewed 953 times
catalog_js_file.png
catalog_js_file.png (79.85 KiB) Viewed 953 times
ajax_calls_work_fine_on_dev.png
ajax_calls_work_fine_on_dev.png (29.83 KiB) Viewed 953 times

johnnuman
Posts: 5
Joined: 17 Jan 2021, 12:00

Re: Categories list don't show in the Admin

Post by johnnuman » 18 Jan 2021, 14:10

Hello. I'm awaiting some input to resolve this matter. the situation is sort of urgent for me. Thank you for understanding.

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

Re: Categories list don't show in the Admin

Post by aimeos » 18 Jan 2021, 17:37

Your problem is probably not the code but your web server and I guess it doesn't allow HTTP OPTIONS requests. Check that in the browser console if there are any errors when working on your staging server.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

johnnuman
Posts: 5
Joined: 17 Jan 2021, 12:00

Re: Categories list don't show in the Admin

Post by johnnuman » 18 Jan 2021, 17:57

Thank you very much for the pointer. It really helped me solve the problem.

For future, if anyone finds this thread, this https://stackoverflow.com/questions/224 ... ns-request helped me set things up on IIS. In short, you need to allow OPTIONS calls on the IIS server which are by default not set.

Post Reply