Error when trying to edit product after Joomla 4.2 update

  • Posts: 220
  • Thank you received: 21
  • Hikashop Business Hikashop Essential
3 months 2 weeks ago #343939

-- HikaShop version -- : 4.6.1
-- Joomla version -- : 4.2.0
-- PHP version -- : 8.1.9
-- Browser(s) name and version -- : Any
-- Error-message(debug-mod must be tuned on) -- : Database not set in Joomla\CMS\Form\Field\TagField

Just opening up a product in the administration area of Hika causes this error:

Database not set in Joomla\CMS\Form\Field\TagField



It doesn't happen when editing or updating anything else like a category.

It also seems to scramble the HikaShop administrator menu (but just when you get that error).

Fortunately, this is not on a production site.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 84
  • Thank you received: 18
  • Hikaserial Subscription
3 months 2 weeks ago #343940

I get the same error. It seems related to /administrator/components/com_hikashop/helpers/tags.php:82
If I disable that line I can edit the product again.

Please Log in or Create an account to join the conversation.

  • Posts: 220
  • Thank you received: 21
  • Hikashop Business Hikashop Essential
3 months 2 weeks ago #343941

Did you disable a plugin or just rename tags.php file?

Please Log in or Create an account to join the conversation.

  • Posts: 84
  • Thank you received: 18
  • Hikaserial Subscription
3 months 2 weeks ago #343942

jazzmang wrote: Did you disable a plugin or just rename tags.php file?

I edited the file and uncommented line 82.

Line 82 edited:
//return $fieldTag->input;

This is just a temporary fix to get access back to the edit page. I'm sure Hikashop will fix the underlying issue ASAP.

The following user(s) said Thank You: jazzmang

Please Log in or Create an account to join the conversation.

  • Posts: 469
  • Thank you received: 5
  • Hikashop Business
3 months 2 weeks ago #343943

Getting exactly the same issue?

Please Log in or Create an account to join the conversation.

  • Posts: 220
  • Thank you received: 21
  • Hikashop Business Hikashop Essential
3 months 2 weeks ago #343944

Thanks, can confirm that does the job at least temporarily until HikaShop fixes it right.

FYI noticed the Tags field is now no longer usable so your mileage may vary.

We don't use tags, so hopefully won't be an issue for us.

Please Log in or Create an account to join the conversation.

  • Posts: 77249
  • Thank you received: 12165
  • MODERATOR
3 months 2 weeks ago #343952

Hi,

Instead of deleting the line

return $fieldTag->input;
of the file /administrator/components/com_hikashop/helpers/tags.php what you can do is add this code before it in that same file:
if(method_exists($fieldTag, 'setDatabase')) {
			$db = JFactory::getDBO();
			$fieldTag->setDatabase($db);
		}
That way, it will fix the problem and the tags system will work again.
We've added the fix in the 4.6.1 on our end.
So for anyone having the issue and reading this :
- if you have HikaShop 4.6.1 you can download it again on our website and install it on yours to get the hot fix
- if you have a previous version of HikaShop, you can just update your HikaShop or apply the patch as explained above

The following user(s) said Thank You: mohairbears, jazzmang, grafixpress, Philip, imcom, khashiz, levelup, Akdag

Please Log in or Create an account to join the conversation.

  • Posts: 91
  • Thank you received: 9
3 months 2 weeks ago #344010

how can a person have solutions for all questions ??

you are a magician Nicolas

thank you

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 2
2 months 3 weeks ago #344562

Thank you for your quick response, Nicolas.
Reinstalling with the hot fixed file worked!

Please Log in or Create an account to join the conversation.

Time to create page: 0.113 seconds
Powered by Kunena Forum