Developer forum

Forum » Development » Module GetContent does not get hit

Module GetContent does not get hit

Marco Santos
Reply

Hello.

 

I have a problem that is driving up the wall, I can´t think of anything that could resolve it.

 

I have a custom module that is registered and included in a paragraph, along with the paragraph settings, that are saved and loaded correctly when I edit them, but if I go to the page where the paragraph is included, it does not get into the GetContent function. Other parts of the code (static function that are used in other places) are hit if I put breakpoint on them, but never on the first line of GetContent.

 

Any ideas??

 

Marco


Replies

 
Morten Bengtson
Reply
This post has been marked as an answer

Hi Marco,

 

That sounds weird.

 

Try to add Debug=true in the query string when you view the page in front end. This will render some debugging information about what is going on. Look for your module system name. There should be an entry like this:

 

"Start module (PID = 123): MyModuleSystemName".

 

Does your content module class have an AddInName attribute that contains the system name of the module? Make sure that there are no spelling errors. If it still doesn't work then there might be a conflict with another module with an identical system name (either standard or custom module).

 

Have a look at the Module table in the database. Make sure the module is active and that the information stored about your custom module is correct.

 

Are you using the Dynamicweb templates for Visual Studio to create your modules?

Have you read the articles about building custom modules? These articles explains how to avoid some of the most common pitfalls.

 

If this doesn't help solve your problem then I think you need to provide more details about your module (code) and what version of Dynamicweb you have installed.

 

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Also, are you outputting the module's content using the ParagraphModule tag? Not sure if DW optimizes by not running your module when the tag isn't present.

 

Imar

 

 
Morten Snedker
Reply

One effective test is to have a

Dynamicweb.Base.we("content module triggered");

 

as the first line in your GetContent(). If that does render I bet Bengtson has hit the nail with the AddInName thing.

 

/Snedker

 

 
Marco Santos
Reply

"Does your content module class have an AddInName attribute that contains the system name of the module?"

 

Erm... not quite... there was space wich made it diferent from the system name in the registration...

 

Thanks.

 

Marco

 

You must be logged in to post in the forum