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

The following tag cannot be processed - error

Development and Programming

Dan Storm's avatar
Dan Storm
70 posts
13 years ago
Dan Storm's avatar Dan Storm

I’m currently trying to develop my own module.

I’m getting this error:

Error The following tag cannot be processed: {exp:lmp:add} Please check that the ‘lmp’ module is installed and that ‘add’ is an available method of the module

This is the code I’m trying out (filename is mod.lmp.php):

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Lmp {
 
 public $EE;
 public $return_data = '';
 
 public function __construct()
 {  
  
  $this->EE =& get_instance();
  $this->EE->load->library('lmpapi'); 
 }
 
 
 function add()
 {
  return 'Test';
 }
 
 
}

It should be noted that I already tried using Lmp() instead of __construct().

I’m using EE 2.5.3.

The mcp.lmp.php and upd.lmp.php works fine - I already created a control panel which works perfectly. Now I need som data to use in my templates.

Anyone know what could be wrong? Or maybe some tips on how to debug this?

       
the3mus1can's avatar
the3mus1can
426 posts
13 years ago
the3mus1can's avatar the3mus1can

Are you sure the module is installed properly in the db? I am assuming the answer is yes because you can access the module in the CP, but non the less. If yes, do you have any other classes that you have named Lmp? You would think that this would throw a PHP error, but I have seen it where it just throws up the error page you are getting. Also make sure there are no funky invisible character hanging around. For instance, if you copied and pasted the <?php if ( ! defined(‘BASEPATH’)) exit(‘No direct script access allowed’); from somewhere else.

       
the3mus1can's avatar
the3mus1can
426 posts
13 years ago
the3mus1can's avatar the3mus1can

Also, open up the Template.php file in the libraries folder and around line 1200, just search for “Problem Processing Module: Module Not Installed”, start var_dumping variables. This is a good starting place to trace the potential issue through the EE.

       
Dan Storm's avatar
Dan Storm
70 posts
13 years ago
Dan Storm's avatar Dan Storm
Also, open up the Template.php file in the libraries folder and around line 1200, just search for “Problem Processing Module: Module Not Installed”, start var_dumping variables. This is a good starting place to trace the potential issue through the EE.

Thank you for your help - by starting debugging I noticed that I added my module name to the modules table in all lowercase, which means when the template tries to find the module I wan’t to use, the ucfirst() name of my module from the loaded module list, didn’t match my all lowercase module name.

It’s working now 😊

       

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.