- Posts: 431
- Thank you received: 19
Joomla 4 - override not working
4 years 3 weeks ago - 4 years 3 weeks ago #344385
by neo191987
Joomla 4 - override not working was created by neo191987
-- HikaShop version -- : 4.6.1
-- Joomla version -- : 4.2.2
Hi, I'm trying to do a Joomla 4 override but it's not working. I tested on Jooma 3 works without problems. I did it this way: YOUR_FRONT_END_TEMPLATE/html/com_hikashop/administrator/helpers/dropdown.override.php
-- Joomla version -- : 4.2.2
Hi, I'm trying to do a Joomla 4 override but it's not working. I tested on Jooma 3 works without problems. I did it this way: YOUR_FRONT_END_TEMPLATE/html/com_hikashop/administrator/helpers/dropdown.override.php
Last edit: 4 years 3 weeks ago by neo191987.
Please Log in or Create an account to join the conversation.
4 years 3 weeks ago - 4 years 3 weeks ago #344401
by neo191987
Replied by neo191987 on topic Joomla 4 - override not working
The problem lies in this code - /administrator/components/com_hikashop/helpers/helper.php
If changed to this code it will work correctly
I'm testing with the latest version of HikaShop Starter
Code:
if((!HIKASHOP_J30 || (isset($app->input) && $app->input->get('Itemid', null) != null)) || hikashop_isClient('administrator')) {
If changed to this code it will work correctly
Code:
if((HIKASHOP_J30 || (isset($app->input) && $app->input->get('Itemid', null) != null)) || hikashop_isClient('administrator')) {
I'm testing with the latest version of HikaShop Starter
Last edit: 4 years 3 weeks ago by neo191987.
Please Log in or Create an account to join the conversation.
4 years 2 weeks ago #344421
by neo191987
Replied by neo191987 on topic Joomla 4 - override not working
Am I really not going to get any support even for a free product that I'm using for testing purposes and wasting my time looking for bugs? I'm really already wondering if I should look for other alternative software in the future.
Please Log in or Create an account to join the conversation.
4 years 2 weeks ago #344389
by nicolas
Replied by nicolas on topic Joomla 4 - override not working
Hi,
I think changing the line:
to:
in the file administrator/components/com_hikashop/helpers/helper.php will fix the problem without creating other issues thanks to the try/catch that was added on the next line after that condition was created when upgrading HikaShop for Joomla 3 support years ago.
That way, we just make sure that $app JApplication is already loaded by Joomla and if it is, we call getTemplate, and if it fails in there (because the template is not yet known), the try/catch should prevent an error.
I did some tests on my end and the change seems to work fine without creating issues. Can you test it on your end ?
If it works for you too, we can include the change for the next version of HikaShop.
I think changing the line:
Code:
if((!HIKASHOP_J30 || (isset($app->input) && $app->input->get('Itemid', null) != null)) || hikashop_isClient('administrator')) {
Code:
if(!empty($app) && method_exists($app, 'getTemplate')) {
That way, we just make sure that $app JApplication is already loaded by Joomla and if it is, we call getTemplate, and if it fails in there (because the template is not yet known), the try/catch should prevent an error.
I did some tests on my end and the change seems to work fine without creating issues. Can you test it on your end ?
If it works for you too, we can include the change for the next version of HikaShop.
The following user(s) said Thank You: neo191987
Please Log in or Create an account to join the conversation.
4 years 2 weeks ago #344422
by nicolas
Replied by nicolas on topic Joomla 4 - override not working
Hi,
I just saw your new message after I posted mine. Please understand that we don't work during weekends. It has nothing to do with free support or not. It's just that it's only been 2 hours that I started working today and only came your your message half an hour ago.
I just saw your new message after I posted mine. Please understand that we don't work during weekends. It has nothing to do with free support or not. It's just that it's only been 2 hours that I started working today and only came your your message half an hour ago.
Please Log in or Create an account to join the conversation.
4 years 2 weeks ago #344423
by neo191987
Replied by neo191987 on topic Joomla 4 - override not working
Thanks for the reply. If Jerome and Mohamed Thelji have also implemented this code in their apps, overrides no can be applied, so let them look at this thread. Unfortunately I can't test their Joomla 4 bug apps because I can't renew my subscriptions right now but if you provide a demo with Joomla 4 in the near future I will join as a tester because as we all know in 1 year support for Joomla 3 is ending and I think it is in all of our interests to keep the number of bugs to a minimum.
Please Log in or Create an account to join the conversation.
4 years 2 weeks ago #344424
by nicolas
Replied by nicolas on topic Joomla 4 - override not working
Hi,
Good idea. I checked the code of HikaSerial, HikaAuction and HikaMarket. Only HikaSerial has the same issue. So we'll have to modify this for the next version of HikaSerial.
Good idea. I checked the code of HikaSerial, HikaAuction and HikaMarket. Only HikaSerial has the same issue. So we'll have to modify this for the next version of HikaSerial.
The following user(s) said Thank You: neo191987
Please Log in or Create an account to join the conversation.
Time to create page: 0.226 seconds