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

#   Mass Action to update variant price causes 500 error

##

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

Less More

- Posts: 43
- Thank you received: 5
-
-

3 years 1 month ago [\#355843](#355843) by [Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")  *[Mass Action to update variant price causes 500 error](/forum/44-mass-actions/907125-mass-action-to-update-variant-price-causes-500-error#355843 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1.24 -- Error-message(debug-mod must be tuned on) -- : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '&#96;Gift Wrapping ($1&#96;.&#96;50)&#96; NOT LIKE '%No%' AND hk&#95;characteristic&#95;parent1.chara...' at line 1  .../libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137  We have a Mass action to update the variant price by $0.50. When we run the action, it triggers a 500 mysql error.")* was created by *[Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")*

-- HikaShop version -- : 5.0.0
-- Joomla version -- : 4.3.4
-- PHP version -- : 8.1.24
-- Error-message(debug-mod must be tuned on) -- : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '&#96;Gift Wrapping ($1&#96;.&#96;50)&#96; NOT LIKE '%No%' AND hk_characteristic_parent1.chara...' at line 1

.../libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137

We have a Mass action to update the variant price by $0.50. When we run the action, it triggers a 500 mysql error.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDcxMjUtbWFzcy1hY3Rpb24tdG8tdXBkYXRlLXZhcmlhbnQtcHJpY2UtY2F1c2VzLTUwMC1lcnJvcj90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

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

3 years 1 month ago [\#355847](#355847) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Mass Action to update variant price causes 500 error](/forum/44-mass-actions/907125-mass-action-to-update-variant-price-causes-500-error#355847 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1.24 -- Error-message(debug-mod must be tuned on) -- : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '&#96;Gift Wrapping ($1&#96;.&#96;50)&#96; NOT LIKE '%No%' AND hk&#95;characteristic&#95;parent1.chara...' at line 1  .../libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137  We have a Mass action to update the variant price by $0.50. When we run the action, it triggers a 500 mysql error.")*

Hi,

Can you provide a screenshot of your massaction settings please ?

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

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

Less More

- Posts: 43
- Thank you received: 5
-
-

3 years 1 month ago [\#355850](#355850) by [Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")  Replied by *[Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")* on topic *[Mass Action to update variant price causes 500 error](/forum/44-mass-actions/907125-mass-action-to-update-variant-price-causes-500-error#355850 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1.24 -- Error-message(debug-mod must be tuned on) -- : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '&#96;Gift Wrapping ($1&#96;.&#96;50)&#96; NOT LIKE '%No%' AND hk&#95;characteristic&#95;parent1.chara...' at line 1  .../libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137  We have a Mass action to update the variant price by $0.50. When we run the action, it triggers a 500 mysql error.")*

Screenshot attached

[ ![CleanShot2023-10-12at13.41.56.png](/forum/attachment/57973) ](/forum/attachment/57973 "...at13.41.56.png")

- [ ![CleanShot2023-10-12at13.41.56.png](/forum/attachment/57973) ](/forum/attachment/57973 "...at13.41.56.png") [ ](/forum/attachment/57973?download=1 "...at13.41.56.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDcxMjUtbWFzcy1hY3Rpb24tdG8tdXBkYXRlLXZhcmlhbnQtcHJpY2UtY2F1c2VzLTUwMC1lcnJvcj90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

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

3 years 1 month ago [\#355851](#355851) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Mass Action to update variant price causes 500 error](/forum/44-mass-actions/907125-mass-action-to-update-variant-price-causes-500-error#355851 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1.24 -- Error-message(debug-mod must be tuned on) -- : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '&#96;Gift Wrapping ($1&#96;.&#96;50)&#96; NOT LIKE '%No%' AND hk&#95;characteristic&#95;parent1.chara...' at line 1  .../libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137  We have a Mass action to update the variant price by $0.50. When we run the action, it triggers a 500 mysql error.")*

Hi,

Thanks.
I see what's going on.
Add the line: Code:

$filter['type'] = str_replace('.','', $filter['type']);

before the line: Code:

$rquery = str_replace('&#96;'.$filter['type'].'&#96;','',$this-&gt;massaction-&gt;getRequest($filter));

in the file plugins/hikashop/massaction_product/massaction_product.php and it should fix the problem.
Let us know how it goes so that we can include the patch on our end.

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

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

Less More

- Posts: 43
- Thank you received: 5
-
-

3 years 1 month ago [\#355881](#355881) by [Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")  Replied by *[Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")* on topic *[Mass Action to update variant price causes 500 error](/forum/44-mass-actions/907125-mass-action-to-update-variant-price-causes-500-error#355881 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1.24 -- Error-message(debug-mod must be tuned on) -- : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '&#96;Gift Wrapping ($1&#96;.&#96;50)&#96; NOT LIKE '%No%' AND hk&#95;characteristic&#95;parent1.chara...' at line 1  .../libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137  We have a Mass action to update the variant price by $0.50. When we run the action, it triggers a 500 mysql error.")*

I added the line as requested in the plugin and the Mass action is not throwing an error. However, it still does not seem to be updating the price as needed.

Please advixe.

Brian

[ ![Screenshot2023-10-13at5.00.20PM.png](/forum/attachment/57978) ](/forum/attachment/57978 "...t5.00.20PM.png")

- [ ![Screenshot2023-10-13at5.00.20PM.png](/forum/attachment/57978) ](/forum/attachment/57978 "...t5.00.20PM.png") [ ](/forum/attachment/57978?download=1 "...t5.00.20PM.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDcxMjUtbWFzcy1hY3Rpb24tdG8tdXBkYXRlLXZhcmlhbnQtcHJpY2UtY2F1c2VzLTUwMC1lcnJvcj90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

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

3 years 1 month ago [\#355903](#355903) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Mass Action to update variant price causes 500 error](/forum/44-mass-actions/907125-mass-action-to-update-variant-price-causes-500-error#355903 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1.24 -- Error-message(debug-mod must be tuned on) -- : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '&#96;Gift Wrapping ($1&#96;.&#96;50)&#96; NOT LIKE '%No%' AND hk&#95;characteristic&#95;parent1.chara...' at line 1  .../libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137  We have a Mass action to update the variant price by $0.50. When we run the action, it triggers a 500 mysql error.")*

Hi,

The patch is only to fix the error caused by the dot character in the name of the characteristic. That's something we had not anticipated.

For the fact that the mass action doesn't do anything, I would recommend to use a "display the results" action in order to see the list of elements found by the mass action.

For example, on our demo website with a similar mass action:
[ i.imgur.com/GYwY6Oy.png](https://i.imgur.com/GYwY6Oy.png)
I get these results:
[ i.imgur.com/XHTcEWv.png](https://i.imgur.com/XHTcEWv.png)

I'm suspecting you actually have no values of your characteristics without the characters "no" in them.

So run a display the results action, and provide a screenshot of the settings of your characteristic.

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

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

Less More

- Posts: 43
- Thank you received: 5
-
-

3 years 1 month ago [\#356044](#356044) by [Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")  Replied by *[Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")* on topic *[Mass Action to update variant price causes 500 error](/forum/44-mass-actions/907125-mass-action-to-update-variant-price-causes-500-error#356044 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1.24 -- Error-message(debug-mod must be tuned on) -- : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '&#96;Gift Wrapping ($1&#96;.&#96;50)&#96; NOT LIKE '%No%' AND hk&#95;characteristic&#95;parent1.chara...' at line 1  .../libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137  We have a Mass action to update the variant price by $0.50. When we run the action, it triggers a 500 mysql error.")*

Hi Nicolas,

You are correct in that I am not getting any products to match my filter. I can not figure out why. Here are my characteristics settings...

[ ![No Gift Wrap](https://files.catbox.moe/rfbl58.jpg) ](https://files.catbox.moe/rfbl58.jpg "No Gift Wrap")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDcxMjUtbWFzcy1hY3Rpb24tdG8tdXBkYXRlLXZhcmlhbnQtcHJpY2UtY2F1c2VzLTUwMC1lcnJvcj90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

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

3 years 1 month ago [\#356045](#356045) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Mass Action to update variant price causes 500 error](/forum/44-mass-actions/907125-mass-action-to-update-variant-price-causes-500-error#356045 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1.24 -- Error-message(debug-mod must be tuned on) -- : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '&#96;Gift Wrapping ($1&#96;.&#96;50)&#96; NOT LIKE '%No%' AND hk&#95;characteristic&#95;parent1.chara...' at line 1  .../libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137  We have a Mass action to update the variant price by $0.50. When we run the action, it triggers a 500 mysql error.")*

Hi,

Try changing the filter to "!=" (different) and as value use the full name "No gift wrap"

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

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

Less More

- Posts: 43
- Thank you received: 5
-
-

3 years 1 month ago [\#356204](#356204) by [Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")  Replied by *[Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")* on topic *[Mass Action to update variant price causes 500 error](/forum/44-mass-actions/907125-mass-action-to-update-variant-price-causes-500-error#356204 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.1.24 -- Error-message(debug-mod must be tuned on) -- : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '&#96;Gift Wrapping ($1&#96;.&#96;50)&#96; NOT LIKE '%No%' AND hk&#95;characteristic&#95;parent1.chara...' at line 1  .../libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137  We have a Mass action to update the variant price by $0.50. When we run the action, it triggers a 500 mysql error.")*

That worked - thank you!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDcxMjUtbWFzcy1hY3Rpb24tdG8tdXBkYXRlLXZhcmlhbnQtcHJpY2UtY2F1c2VzLTUwMC1lcnJvcj90bXBsPW1hcmtkb3du) 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.076 seconds

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