[Skip to main content](#vessel-content)

#   Error with weight array key

##

- **[Jokingmind](/forum/user/55846-jokingmind "View Jokingmind's Profile")**
- [![Jokingmind's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/55846-jokingmind "View Jokingmind's Profile") Topic Author
- [ Offline](/forum/user/55846-jokingmind)

Less More

- Posts: 64
- Thank you received: 6
-

4 years 1 month ago [\#345241](#345241) by [Jokingmind](/forum/user/55846-jokingmind "View Jokingmind's Profile")  *[Error with weight array key](/forum/27-checkout/905098-error-with-weight-array-key#345241 "-- HikaShop version -- : 4.6.2 -- Joomla version -- : 4.2.3 -- PHP version -- : 8.0 -- Error-message(debug-mod must be tuned on) -- : Warning: Undefined array key &quot;gr&quot; in L:&#92;laragon&#92;www&#92;zoe4&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;weight.php on line 42  Hello everyone, I am migrating from version 3.10 to 4.2.3. When I go to the checkout page an error is thrown: Warning: Array key &quot;gr&quot; undefined in L:&#92;laragon&#92;www&#92;zoe4&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;weight.php at line 42  I had added the unit 'gr' in the configuration/advanced/weight symbols page, but the system replies that 'The weight unit &quot;gr&quot; is not in the list of possible units: mg,g,dag,kg,t,lb,oz,ozt,l,ml,cl'. Has anything changed? This value comes from Joomla version 3.9, and I had no problems there.  Thank you Davide")* was created by *[Jokingmind](/forum/user/55846-jokingmind "View Jokingmind's Profile")*

-- HikaShop version -- : 4.6.2
-- Joomla version -- : 4.2.3
-- PHP version -- : 8.0
-- Error-message(debug-mod must be tuned on) -- : Warning: Undefined array key "gr" in L:\laragon\www\zoe4\administrator\components\com_hikashop\helpers\weight.php on line 42

Hello everyone,
I am migrating from version 3.10 to 4.2.3.
When I go to the checkout page an error is thrown:
Warning: Array key "gr" undefined in L:\laragon\www\zoe4\administrator\components\com_hikashop\helpers\weight.php at line 42

I had added the unit 'gr' in the configuration/advanced/weight symbols page, but the system replies that 'The weight unit "gr" is not in the list of possible units: mg,g,dag,kg,t,lb,oz,ozt,l,ml,cl'.
Has anything changed? This value comes from Joomla version 3.9, and I had no problems there.

Thank you
Davide

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNTA5OC1lcnJvci13aXRoLXdlaWdodC1hcnJheS1rZXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

4 years 1 month ago [\#345243](#345243) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Error with weight array key](/forum/27-checkout/905098-error-with-weight-array-key#345243 "-- HikaShop version -- : 4.6.2 -- Joomla version -- : 4.2.3 -- PHP version -- : 8.0 -- Error-message(debug-mod must be tuned on) -- : Warning: Undefined array key &quot;gr&quot; in L:&#92;laragon&#92;www&#92;zoe4&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;weight.php on line 42  Hello everyone, I am migrating from version 3.10 to 4.2.3. When I go to the checkout page an error is thrown: Warning: Array key &quot;gr&quot; undefined in L:&#92;laragon&#92;www&#92;zoe4&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;weight.php at line 42  I had added the unit 'gr' in the configuration/advanced/weight symbols page, but the system replies that 'The weight unit &quot;gr&quot; is not in the list of possible units: mg,g,dag,kg,t,lb,oz,ozt,l,ml,cl'. Has anything changed? This value comes from Joomla version 3.9, and I had no problems there.  Thank you Davide")*

Hi,

No, that message "The weight unit "gr" is not in the list of possible units: mg,g,dag,kg,t,lb,oz,ozt,l,ml,cl" was always there. You cannot provide a weight unit different than the ones in there.
If you want to use grams but you want to display gr instead of g, what you can do is to use g and then add a translation override like this:
G="gr"
[ www.hikashop.com/download/languages.html#modify](https://www.hikashop.com/download/languages.html#modify)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNTA5OC1lcnJvci13aXRoLXdlaWdodC1hcnJheS1rZXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jokingmind](/forum/user/55846-jokingmind "View Jokingmind's Profile")**
- [![Jokingmind's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/55846-jokingmind "View Jokingmind's Profile") Topic Author
- [ Offline](/forum/user/55846-jokingmind)

Less More

- Posts: 64
- Thank you received: 6
-

4 years 1 month ago [\#345286](#345286) by [Jokingmind](/forum/user/55846-jokingmind "View Jokingmind's Profile")  Replied by *[Jokingmind](/forum/user/55846-jokingmind "View Jokingmind's Profile")* on topic *[Error with weight array key](/forum/27-checkout/905098-error-with-weight-array-key#345286 "-- HikaShop version -- : 4.6.2 -- Joomla version -- : 4.2.3 -- PHP version -- : 8.0 -- Error-message(debug-mod must be tuned on) -- : Warning: Undefined array key &quot;gr&quot; in L:&#92;laragon&#92;www&#92;zoe4&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;weight.php on line 42  Hello everyone, I am migrating from version 3.10 to 4.2.3. When I go to the checkout page an error is thrown: Warning: Array key &quot;gr&quot; undefined in L:&#92;laragon&#92;www&#92;zoe4&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;weight.php at line 42  I had added the unit 'gr' in the configuration/advanced/weight symbols page, but the system replies that 'The weight unit &quot;gr&quot; is not in the list of possible units: mg,g,dag,kg,t,lb,oz,ozt,l,ml,cl'. Has anything changed? This value comes from Joomla version 3.9, and I had no problems there.  Thank you Davide")*

Hi
that's really funny cause the message has only now appeared. The same site, before the update to J4, did not show any error; I was able to select 'gr" from the dropdown menu in the product page (admin) and there were no error about that unit in the checkout process.

Anyway, I've created a mass action and changed all the values to the defalut 'g' unit.

Thank you for the reply!
Davide

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNTA5OC1lcnJvci13aXRoLXdlaWdodC1hcnJheS1rZXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.051 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
