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

#   cant show product in article

##

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

Less More

- Posts: 145
- Thank you received: 6
-
-

5 years 4 months ago [\#334545](#334545) by [levelup](/forum/user/61801-levelup "View levelup's Profile")  *[cant show product in article](/forum/30-integrations/902981-cant-show-product-in-article#334545 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.27 -- PHP version -- : 7.2 -- Error-message(debug-mod must be tuned on) -- : 0 Call to a member function getTemplate() on null /home/perfumesmart/public&#95;html/plugins/system/hikashopproductinsert/hikashopproductinsert.php:378  Hi every body i want adding products in Joomla's articles. but this error is display:  the code in line 378 ic  I try default joomla template but error remaining yet. can anyone help please?")* was created by *[levelup](/forum/user/61801-levelup "View levelup's Profile")*

-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.27
-- PHP version -- : 7.2
-- Error-message(debug-mod must be tuned on) -- : 0 Call to a member function getTemplate() on null
/home/perfumesmart/public_html/plugins/system/hikashopproductinsert/hikashopproductinsert.php:378

Hi every body
i want adding products in Joomla's articles. but this error is display: Code:

0 Call to a member function getTemplate() on null /home/perfumesmart/public_html/plugins/system/hikashopproductinsert/hikashopproductinsert.php:378

the code in line 378 ic Code:

$path = JPATH_THEMES.DS.$app-&gt;getTemplate().DS.'system'.DS.$name;

I try default joomla template but error remaining yet. can anyone help please?

---

Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.

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

Less More

- Posts: 86587
- Thank you received: 14325
-
-

5 years 4 months ago [\#334548](#334548) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[cant show product in article](/forum/30-integrations/902981-cant-show-product-in-article#334548 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.27 -- PHP version -- : 7.2 -- Error-message(debug-mod must be tuned on) -- : 0 Call to a member function getTemplate() on null /home/perfumesmart/public&#95;html/plugins/system/hikashopproductinsert/hikashopproductinsert.php:378  Hi every body i want adding products in Joomla's articles. but this error is display:  the code in line 378 ic  I try default joomla template but error remaining yet. can anyone help please?")*

Hi,

This error message indicates that the $app variable is not set before in the code. However, if you go up about 200 lines in the same function / file, you'll see this lins near the top of the _processProduct function:
$app = JFactory::getApplication();
I've never seen that line return "null", which your PHP complains about.
So either that line has been removed from that area on your end, or you have a strange problem on your website.
I looked a bit online but I couldn't find really any page talking about JFactory::getApplication returning null, and that's quite normal, as that's almost the main function of Joomla.
So I would rather say that the $app = JFactory::getApplication(); has been removed from the plugin file on your website for some reason.
Or maybe that plugin file was not updated from a really old version of the plugin because of access rights issues on the plugin files. At the beginning of the file, you'll have the version number from which the file comes. If you have HikaShop 4.4.1, it should be the same version number. If you have something else, then you likely have an access rights issue on that file. You'll have to check the permissions there and then run the HikaShop update / install to get the latest version of HikaShop and that file and it should hopefully work fine. Or you could simply add the line $app = JFactory::getApplication(); just before the line of the error, but you might end up with other errors down the line.

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

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

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

Less More

- Posts: 145
- Thank you received: 6
-
-

5 years 4 months ago [\#334563](#334563) by [levelup](/forum/user/61801-levelup "View levelup's Profile")  Replied by *[levelup](/forum/user/61801-levelup "View levelup's Profile")* on topic *[cant show product in article](/forum/30-integrations/902981-cant-show-product-in-article#334563 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.27 -- PHP version -- : 7.2 -- Error-message(debug-mod must be tuned on) -- : 0 Call to a member function getTemplate() on null /home/perfumesmart/public&#95;html/plugins/system/hikashopproductinsert/hikashopproductinsert.php:378  Hi every body i want adding products in Joomla's articles. but this error is display:  the code in line 378 ic  I try default joomla template but error remaining yet. can anyone help please?")*

thanks for answer. I update to 4.4.3 and problem is solved.
in hikashop 4.4.3 the hikashopproductinsert.php file version is 4.4.1
but its work.

---

Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.

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

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

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