Loading...
 
Development

Development


Plugin-Devel: Blank page on edit_page

posts: 25 United States

Hi All,

I'm back again!

This time I'm trying my hand at plugin development.... So far I have one plugin working and I was working on another version of it when I ran into this problem.

The new module is a re-hack of the wikiplugin-sql module. My version is a bit more specific in that it's pretty much designed to return a given table of data from the Request Tracker application.

The plugin does work and throughout the debugging I was seeing normal results. When the function call ends I echo'd the return value just to see what was getting returned from teh function and it matches what I saw when I did the same thing in the SQL plug-in.

The plugin returns a formatted table similar to the SQL plugin. I've verified that the two outputs are identical but the odd thing is that when I finish the edit and then Save the page, all I get is a blank page. No source returned at all.

In order to get the edit page back I have to move/rename the plugin file to get the "No such module" error and then I can finish the save. After I save the page with the "No such module error" I can then rename/copy back the plugin file and the table renders just fine! eek

I've placed the plugin on a blank page all to itself and it still does it....

Not it gets even weirder; The earlier variant of that plugin that I have works just fine!

Any suggestions on where/how to troubleshoot next? As far as I can see the plugin has finished and returned the result to the wiki. I'm thinking something in the return file is messing with the page rendering....

MichaelE wrote:

SOLUTION:
So it turns out that duplicate function names are BAD! I had two plugins I was working with; the second of which was basically a clone of the first which therefore had duplicate functions. When tiki-editpage.php loads the functions in the plug-ins are enumerated and duplicate functions will cause the tiki-editpage.php to die. Once toggg passed this idea onto me, I renamed the functions and lo and behold the editpage came up just fine!

Thanks to toggg on the IRC channel for working with me on this.