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

#   product template problem

##

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 1 month ago [\#173132](#173132) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem?start=20#173132 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

ok,

slight update on the issue - another user can add products ok, so it must not be related to the error message at the top of screen (though I still wonder what that is!)

I am now investigating the account that I am using!?

thanks,

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 1 month ago [\#173137](#173137) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem?start=20#173137 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,

The line 487 means that the variable "$product" is not an object, so that the variable contains a "null" or a "false". Code:

$product-&gt;categories = $db-&gt;loadObjectList('category_id');

Which means that the template_id configured target a product which does not exists anymore.

Same thing for the second error, the "foreach" is made on the return for the template loading.
If the template_id does not exist anymore, the load can't work and you got the error.
I can add "security" code in order to check the content ; but the current problem is in your configuration.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 1 month ago [\#173159](#173159) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem?start=20#173159 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Ok,

so I added the template again and it works perfectly (so I guess I can ignore the error messages when I didnt have the template)

My account creating products with 404 errors turns out if I clear the cache the 404 errors stop. If I add or remove a template, but dont clear my browser cache the 404 error appeared. I'll keep that in mind from now on.

so basically that is all working ok now - thanks!!

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 1 month ago [\#173163](#173163) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem?start=20#173163 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,

You're welcome ![:)](/media/kunena/emoticons/3.png ":)")

I wrote some checks in HikaMarket in order to avoid such problem with a non-existing product template.
So this kind of problem won't appear with HikaMarket 1.5.0

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.068 seconds

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