Error when trying to edit product after Joomla 4.2 update

  • Posts: 228
  • Thank you received: 21
  • Hikashop Business Hikashop Essential
1 year 7 months 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: 88
  • Thank you received: 19
1 year 7 months 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: 228
  • Thank you received: 21
  • Hikashop Business Hikashop Essential
1 year 7 months 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: 88
  • Thank you received: 19
1 year 7 months 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: 513
  • Thank you received: 8
  • Hikashop Business
1 year 7 months ago #343943

Getting exactly the same issue?

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

  • Posts: 228
  • Thank you received: 21
  • Hikashop Business Hikashop Essential
1 year 7 months 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: 81378
  • Thank you received: 13037
  • MODERATOR
1 year 7 months 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, yumasan, grafixpress, Philip, imcom, SEKME, khashiz, levelup, Akdag

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

  • Posts: 197
  • Thank you received: 13
1 year 7 months 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: 34
  • Thank you received: 2
  • Hikashop Business
1 year 6 months 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.138 seconds
Powered by Kunena Forum