Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#6381 by michal.fehér
07 Jul 2018, 10:15
Hi. Any idea why values of $this->getContext()->getLocale() has languageid and currencyid NULL while bdata contains this data? I am attaching also local DB tables data.
Snip20180707_16.png (94.33 KiB) Viewed 194 times
Snip20180707_15.png (97.08 KiB) Viewed 194 times
Snip20180707_21.png (146.69 KiB) Viewed 194 times
#6389 by aimeos
09 Jul 2018, 07:43
Depends on the environment. If you are in a job controller that is executed via CLI, language and currency are NULL because you have to loop over the available sites and set the locale depending on the current site (at least most of the time).
#6397 by michal.fehér
09 Jul 2018, 10:49
Yes, it's in controller called via CLI (product import -> Text processor).

How do these lines work then?

Code: Select allif( !isset( $list['text.languageid'] ) ) {
   $list['text.languageid'] = $this->getContext()->getLocale()->getLanguageId();

will this ever be populated if it's NULL?
#6409 by aimeos
10 Jul 2018, 20:00
Well, they doesn't work at all. Somebody wanted to do something good but it doesn't work as expected like you mentioned. We will remove that lines and you have to add the languageid to a column of your import file.