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

#   Custom module position in lisiting\_div causes "500 - Layout listing\_ not found."

##

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

Less More

- Posts: 29
- Thank you received: 1
-
-

9 years 1 month ago [\#279081](#279081) by [roojai](/forum/user/9880-roojai "View roojai's Profile")  *[Custom module position in lisiting\_div causes "500 - Layout listing\_ not found."](/forum/26-product-category-display/892087-custom-module-position-in-lisiting-div-causes-500-layout-listing-not-found#279081 "-- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.7.5 -- PHP version -- : 7.0.23 -- Error-message(debug-mod must be tuned on) -- : 500 - Layout listing&#95; not found.  This is a strange one! I want to put a filter in a custom position on a product page.  The position is below the actual product so I customised the listing&#95;div layout and used code like this to display a module&quot;  This works in other places in my customisations, for example I use this code to display a filter on my product category page.  But for some reason it causes an error: 500 - Layout listing&#95; not found.  If I unpublish the module, but leave the code in the layout over-ride then the error goes.  If I publish the same module on the same page in a proper template module position then its fine, and the module will show.  So I am asking if there is something special about the listing&#95;div.php code which might prevent a custom module position.  Many thanks!")* was created by *[roojai](/forum/user/9880-roojai "View roojai's Profile")*

-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.7.5
-- PHP version -- : 7.0.23
-- Error-message(debug-mod must be tuned on) -- : 500 - Layout listing_ not found.

This is a strange one! I want to put a filter in a custom position on a product page.

The position is below the actual product so I customised the listing_div layout and used code like this to display a module"
Code:

&lt;?php jimport( 'joomla.application.module.helper' ); $modules = JModuleHelper::getModules( 'productfilter' ); foreach ($modules as $module) { echo JModuleHelper::renderModule( $module ); } ?&gt;

This works in other places in my customisations, for example I use this code to display a filter on my product category page.

But for some reason it causes an error: 500 - Layout listing_ not found.

If I unpublish the module, but leave the code in the layout over-ride then the error goes.

If I publish the same module on the same page in a proper template module position then its fine, and the module will show.

So I am asking if there is something special about the listing_div.php code which might prevent a custom module position.

Many thanks!

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

9 years 1 month ago [\#279085](#279085) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom module position in lisiting\_div causes "500 - Layout listing\_ not found."](/forum/26-product-category-display/892087-custom-module-position-in-lisiting-div-causes-500-layout-listing-not-found#279085 "-- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.7.5 -- PHP version -- : 7.0.23 -- Error-message(debug-mod must be tuned on) -- : 500 - Layout listing&#95; not found.  This is a strange one! I want to put a filter in a custom position on a product page.  The position is below the actual product so I customised the listing&#95;div layout and used code like this to display a module&quot;  This works in other places in my customisations, for example I use this code to display a filter on my product category page.  But for some reason it causes an error: 500 - Layout listing&#95; not found.  If I unpublish the module, but leave the code in the layout over-ride then the error goes.  If I publish the same module on the same page in a proper template module position then its fine, and the module will show.  So I am asking if there is something special about the listing&#95;div.php code which might prevent a custom module position.  Many thanks!")*

Hi,

It's a reference issue. The rendering of the module must overwrite the $this-&gt;params array where all the display settings are stored for the view display.
Before your code, add:
$params = $this-&gt;params;
And after your code, add:
$this-&gt;params = $params;

That should save the params and circumvent the issue.

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

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

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

Less More

- Posts: 29
- Thank you received: 1
-
-

9 years 1 month ago [\#279118](#279118) by [roojai](/forum/user/9880-roojai "View roojai's Profile")  Replied by *[roojai](/forum/user/9880-roojai "View roojai's Profile")* on topic *[Custom module position in lisiting\_div causes "500 - Layout listing\_ not found."](/forum/26-product-category-display/892087-custom-module-position-in-lisiting-div-causes-500-layout-listing-not-found#279118 "-- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.7.5 -- PHP version -- : 7.0.23 -- Error-message(debug-mod must be tuned on) -- : 500 - Layout listing&#95; not found.  This is a strange one! I want to put a filter in a custom position on a product page.  The position is below the actual product so I customised the listing&#95;div layout and used code like this to display a module&quot;  This works in other places in my customisations, for example I use this code to display a filter on my product category page.  But for some reason it causes an error: 500 - Layout listing&#95; not found.  If I unpublish the module, but leave the code in the layout over-ride then the error goes.  If I publish the same module on the same page in a proper template module position then its fine, and the module will show.  So I am asking if there is something special about the listing&#95;div.php code which might prevent a custom module position.  Many thanks!")*

Perfect - that worked!

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

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