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

#   Joomla 4 - override not working

##

- **[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")**
- [![neo191987's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35364.jpg)](/forum/user/35364-neo191987 "View neo191987's Profile") Topic Author
- [ Offline](/forum/user/35364-neo191987)

Less More

- Posts: 431
- Thank you received: 19
-
-

4 years 2 months ago -  4 years 2 months ago [\#344385](#344385) by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")  *[Joomla 4 - override not working](/forum/31-development/904956-joomla-4-override-not-working#344385 "-- 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&#95;FRONT&#95;END&#95;TEMPLATE/html/com&#95;hikashop/administrator/helpers/dropdown.override.php")* was created by *[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")*

-- 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

Last edit: 4 years 2 months ago by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile").

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

- **[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")**
- [![neo191987's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35364.jpg)](/forum/user/35364-neo191987 "View neo191987's Profile") Topic Author
- [ Offline](/forum/user/35364-neo191987)

Less More

- Posts: 431
- Thank you received: 19
-
-

4 years 2 months ago -  4 years 2 months ago [\#344401](#344401) by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")  Replied by *[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")* on topic *[Joomla 4 - override not working](/forum/31-development/904956-joomla-4-override-not-working#344401 "-- 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&#95;FRONT&#95;END&#95;TEMPLATE/html/com&#95;hikashop/administrator/helpers/dropdown.override.php")*

The problem lies in this code - /administrator/components/com_hikashop/helpers/helper.php
Code:

if((!HIKASHOP_J30 &#124;&#124; (isset($app-&gt;input) &amp;&amp; $app-&gt;input-&gt;get('Itemid', null) != null)) &#124;&#124; hikashop_isClient('administrator')) {

If changed to this code it will work correctly
Code:

if((HIKASHOP_J30 &#124;&#124; (isset($app-&gt;input) &amp;&amp; $app-&gt;input-&gt;get('Itemid', null) != null)) &#124;&#124; hikashop_isClient('administrator')) {

I'm testing with the latest version of HikaShop Starter

Last edit: 4 years 2 months ago by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile").

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

- **[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")**
- [![neo191987's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35364.jpg)](/forum/user/35364-neo191987 "View neo191987's Profile") Topic Author
- [ Offline](/forum/user/35364-neo191987)

Less More

- Posts: 431
- Thank you received: 19
-
-

4 years 2 months ago [\#344421](#344421) by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")  Replied by *[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")* on topic *[Joomla 4 - override not working](/forum/31-development/904956-joomla-4-override-not-working#344421 "-- 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&#95;FRONT&#95;END&#95;TEMPLATE/html/com&#95;hikashop/administrator/helpers/dropdown.override.php")*

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. ![:(](/media/kunena/emoticons/22.png ":(")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwNDk1Ni1qb29tbGEtNC1vdmVycmlkZS1ub3Qtd29ya2luZz90bXBsPW1hcmtkb3du) 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: 86541
- Thank you received: 14304
-
-

4 years 2 months ago [\#344389](#344389) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Joomla 4 - override not working](/forum/31-development/904956-joomla-4-override-not-working#344389 "-- 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&#95;FRONT&#95;END&#95;TEMPLATE/html/com&#95;hikashop/administrator/helpers/dropdown.override.php")*

Hi,

I think changing the line: Code:

if((!HIKASHOP_J30 &#124;&#124; (isset($app-&gt;input) &amp;&amp; $app-&gt;input-&gt;get('Itemid', null) != null)) &#124;&#124; hikashop_isClient('administrator')) {

to: Code:

if(!empty($app) &amp;&amp; method_exists($app, 'getTemplate')) {

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.

The following user(s) said Thank You: [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwNDk1Ni1qb29tbGEtNC1vdmVycmlkZS1ub3Qtd29ya2luZz90bXBsPW1hcmtkb3du) 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: 86541
- Thank you received: 14304
-
-

4 years 2 months ago [\#344422](#344422) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Joomla 4 - override not working](/forum/31-development/904956-joomla-4-override-not-working#344422 "-- 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&#95;FRONT&#95;END&#95;TEMPLATE/html/com&#95;hikashop/administrator/helpers/dropdown.override.php")*

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.

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

- **[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")**
- [![neo191987's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35364.jpg)](/forum/user/35364-neo191987 "View neo191987's Profile") Topic Author
- [ Offline](/forum/user/35364-neo191987)

Less More

- Posts: 431
- Thank you received: 19
-
-

4 years 2 months ago [\#344423](#344423) by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")  Replied by *[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")* on topic *[Joomla 4 - override not working](/forum/31-development/904956-joomla-4-override-not-working#344423 "-- 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&#95;FRONT&#95;END&#95;TEMPLATE/html/com&#95;hikashop/administrator/helpers/dropdown.override.php")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwNDk1Ni1qb29tbGEtNC1vdmVycmlkZS1ub3Qtd29ya2luZz90bXBsPW1hcmtkb3du) 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: 86541
- Thank you received: 14304
-
-

4 years 2 months ago [\#344424](#344424) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Joomla 4 - override not working](/forum/31-development/904956-joomla-4-override-not-working#344424 "-- 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&#95;FRONT&#95;END&#95;TEMPLATE/html/com&#95;hikashop/administrator/helpers/dropdown.override.php")*

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.

The following user(s) said Thank You: [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")

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

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