We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Custom module class not invoked when _mod suffix used.

Development and Programming

Kindari's avatar
Kindari
41 posts
14 years ago
Kindari's avatar Kindari

I am working on a custom module for my client, according to the documentation my file should be mod.package_name.php and the class should be Package_name_mod.

However I get errors when I conform to these instructions

Fatal Error: Package_name not found in /var/www/ee-sdbox/system/expressionengine/libraries/Template.php

If I remove the _mod suffix then the class works just fine. Am I missing something? I want the module to follow EE conventions as much as possible.

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
14 years ago
Sue Crocker's avatar Sue Crocker

Hi, Kindari.

Since this is a programming question, moving to the Development forum.

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
14 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

It looks like this is a case of the documentation being incorrect. I see in a few places the docs reference Package_name for modules but in one spot (http://ellislab.com/expressionengine/user-guide/development/modules.html) it mentions the _mod suffix. It looks like it’s a botch copy/paste/replace job from the mcp.package_name.php copy higher up on the page.

The class name should not have a suffix of _mod. I’ll see if I can verify this with an EllisLab dev but I’m pretty sure I’m right.

       
Kindari's avatar
Kindari
41 posts
14 years ago
Kindari's avatar Kindari

I really appreciate your response, Erik. I do wish that the development documentation and tutorials were more on par with the quality of codeigniter’s.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.