Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#5438 by qvotaxon
17 Jan 2018, 12:52
Hi there!

Currently I'm setting up a shop with some demo content. To do this I added categories and added products to those categories. Next I wanted to add some images (stage) to these categories and add texts for the multiple languages the webshop supports. However I can't seem to be able to add images or add texts. All the fields on the catalog page in the jqadm backend are disabled.

What's strange is that I can edit these settings in the extadm interface. So to me it doesn't seem like an authentication or role problem. What's even more strange is that when I add text to the category using the extadm interface I can edit the fields in the jqadm interface.

Also I just noticed that images added using the extadm interface don't show up in the jqadm backend. This could possibly be a related issue.

Could you please assist me further?

I uploaded an image to ImageBin: Image

My installation details:

- Aimeos 2017.10 (latest via composer)
- Laravel 5.5.*
- PHP 7.1
- Linux (Ubuntu 16.04.1)
#5457 by qvotaxon
18 Jan 2018, 17:19
The output of the composer show command is a bit long, so I uploaded it to pastebin:

I'm not quite sure how to check for the siteid issue. There is only one shop running, and the admin is newly created using the laravel artisan make::auth command. Should I be looking for a configuration fault in my shop.php?

I noticed that the barryvdh/laravel-debugbar library sometimes causes problems. Even though it's shown in the composer output, it's currently not active.

Thanks for your reply!
#5458 by aimeos
18 Jan 2018, 18:04
The composer output looks OK. Does this happen only in the category panel and not in the other panels for products, services, attributes, etc.?

Maybe you can put some debug output there:

Can you also remove the debug toolbar completely to see if this is the problem or not?
#5461 by qvotaxon
18 Jan 2018, 18:51
This happens to all fields, in all types, but only after pressing the +-sign (so the newly shown fields after clicking). Fields that are already displayed do function properly. Fields added through extadm are also editable.

I removed the debugbar from the composer and ran composer update.

The output of $this->site()->readonly( $this->get( 'textData/siteid/' . $idx ) ) is null.
The value of $idx = "de", though I'm editing using lang = nl.
The output of dd($this->get( 'textData/siteid/' . $idx )); is 1.
#5462 by aimeos
18 Jan 2018, 22:13
qvotaxon wrote:The output of $this->site()->readonly( $this->get( 'textData/siteid/' . $idx ) ) is null.
The value of $idx = "de", though I'm editing using lang = nl.
The output of dd($this->get( 'textData/siteid/' . $idx )); is 1.

All output is as expected and the fields should work without being disabled. Can you check in the web inspector, why the fields are disabled (CSS style or input field attribute)?
#5464 by qvotaxon
19 Jan 2018, 11:06
The fields are disabled by the html disabled attribute. I will do some more debugging when I get behind my computer and will edit my post accordingly.

After some more checking, I noticed that the inputs contained in the 'group-item card prototype' element already contain the disabled property. So I think something is going wrong at page load, or is this normal behaviour? Removing the disabled attribute from the prototype elements, using Chrome DevTools, resolves the issue. Is the disabled attribute being added by checking a condition, or being removed by checking a condition? Because either one of these cases seems to be causing the issue.
#5467 by aimeos
19 Jan 2018, 11:42
The "disabled" attribute is in the template and should be removed when a new item is added:

For texts, the rest of the code is here:

I'm wondering why this only happens for you. No other user ever reported that problem and Aimeos 2017.10 is the most widely used version at the moment. Is there any Javascript error in the developer console of your browser?
#5468 by qvotaxon
19 Jan 2018, 12:35
I found the solution and the cause of the problem. I use Google Pagespeed and somehow, for some reason unclear to me, it screws up the javascript. I disabled it using the ModPagespeed=off get parameter and now everything works.

Do you have any pointers on how to resolve this issue or on where to look for a solution? Or should I just skip using Google Pagespeed for this project?

Many many thanks for your time again! Your support is superb!
#5471 by aimeos
19 Jan 2018, 20:56
Very strange! Unfortunately we have no idea why Pagespeed screws up the JS, so the only option will be to disable the extension for the Aimeos admin interface. Maybe you can create a bug report for the Pagespeed extension developers.

Thank you, we appreciate to help each other. This is how a community works and it would be nice if you would help others in the future too, if you know more about Aimeos :-)