Page 1 of 2

Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Wed Jun 24, 2009 7:27 am
by chuckienorton
Just installed fresh 1.6, and CTLModuleMaker 1.8.7.1. After going through all the stuff and creating a module called "portfolio" I tried to display the default settings in a page using this:  {cms_module module="portfolio"}

But it's just a blank page.

here is default template:

{foreach from=$itemlist item="item"}
   {$item->detaillink} {$item->name}
{/foreach}


Any clues. Just started using this module and the idea of it is AMAZING... I'm just hoping to get it to work. Thanks in advance!

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Wed Jun 24, 2009 11:41 am
by plger
Stupid question, but I assume you created items?

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Wed Jun 24, 2009 12:48 pm
by blast2007
Strange behavior also here with release 1.8.7.1 and mod_rewrite turned on.

As test install demoof prodcatalogue 2.0 (created with 1.8.4 of CTLModuleMaker)

It works correctly, but if you take same dna file (prodcatalogue_auto_export.dna) and create again module with CTLModuleMaker 1.8.7.1, new module doesn't work anymore (The list feature works but details of every item is blank).

Maybe it depends on mod_rewrite, because if I disable mod_rewrite detail page works again.

Regards
blast

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Wed Jun 24, 2009 1:20 pm
by plger
There's indeed a problem, I'll look into it.
Thanks,

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Wed Jun 24, 2009 1:45 pm
by plger
In the module file (xxx.module.php), in function SetParemeters, try adding

Code: Select all

array("action"=>"default")
to all RegisterRoute calls... for example:

Code: Select all

$this->RegisterRoute("/[pP]rodcatalogue\/([Dd]etail)\/(?P<alias>[^\/]+)\/(?P<returnid>[0-9]+)$/");
becomes

Code: Select all

$this->RegisterRoute("/[pP]rodcatalogue\/([Dd]etail)\/(?P<alias>[^\/]+)\/(?P<returnid>[0-9]+)$/", array("action"=>"default"));

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Wed Jun 24, 2009 2:09 pm
by blast2007
WOW
Now it works again!

You solved my problem toooooo fast!  Thanks a lot!

regards
blast

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Wed Jun 24, 2009 2:10 pm
by plger
Good, I'll change this in the next release.
Thanks to both of you for letting me know.
Pierre-Luc

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Wed Jun 24, 2009 2:34 pm
by chuckienorton
plger wrote: Stupid question, but I assume you created items?
Thanks for fast response. Yep... tested 2 categories & 2 or 3 items in the category.

I also was playing with mod_rewrite b/c I was having problems with it in general, but ended up using 'include'.

So do above changes apply to me too?

C

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Wed Jun 24, 2009 2:45 pm
by plger
I don't know - if you had a blank page before clicking any link, this shouldn't be the problem. But as this is the only problem I found right now, I'd suggest to give it a try (or download the brand new release of ctlmm).
If the problem isn't there, we'll find out together where it is, but I'll need some cues because I'm not experiencing it here.

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Wed Jun 24, 2009 7:57 pm
by chuckienorton
plger wrote: I don't know - if you had a blank page before clicking any link, this shouldn't be the problem. But as this is the only problem I found right now, I'd suggest to give it a try (or download the brand new release of ctlmm).
If the problem isn't there, we'll find out together where it is, but I'll need some cues because I'm not experiencing it here.
Thanks.  I just uninstalled my mod...and then upgraded CTLModuleMaker, and used it to recreate my mod (portfolio). It didn't help. But I should restate.. it's not showing me a blank SCREEN.. just blank section where the porftolio is supposed to show up. I added {cms_module module="portfolio"} to the site page, and followed other instructions, and yet that section is totally blank on the frontend.

It's running in MAMP now, or I would give you link.

Thanks for being so helpful.

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Wed Jun 24, 2009 8:23 pm
by plger
Ok. As everything works fine on my side, you'll have to help me find the problem.
In your page, where you put the {cms_module module="portfolio"}, disable the wysiwyg just to make sure it's not encoding the tag (it shouldn't happen, but better safe than sorry).
If you can, edit the config.php file, set the debug mode on ( $config["debug"] = true;  ), and let me know if any error message appears on the page.
If you can, edit the action.default.php file (of the portfolio module), and just below the if(!isset($gCms)) exit; line, add :
print_r($params);
and tell me what gets printed on the page.
Give me the content of the module's dna file.

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Wed Jun 24, 2009 8:39 pm
by chuckienorton
Thanks! Will do this later today. ;-)

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Thu Jun 25, 2009 5:46 am
by chuckienorton
@piger .. here is print_r results:   Array ( [module] => portfolio [action] => default )

wouldn't let me attach a .dna file, so I simply changed the filetype to .txt.

;-)

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Thu Jun 25, 2009 11:05 am
by plger
Thanks.
Does the problem persist when you have several "Clients"? Because I did experience the problem here, but it was only when there was only one client to display.

My diagnosis:
- Because of a bug on my part, the default detail template wasn't created (just the default list template)
- When you attempt to display elements, if you have only one element, the default action will show directly details instead of listing a single element (you can change that behavior in settings)
- But as there is no template for details, nothing shows up.

Solution:
Create a new template (which uses $item and it's properties - see the template variables tab) and set it as the default detail template in the combo box.

I will try to correct this in CTLMM quickly.
Thanks for reporting it.
Pierre-Luc

Re: Having Problems getting CTLModuleMaker module to work with 1.6

Posted: Thu Jun 25, 2009 2:50 pm
by chuckienorton
Changing settings to show the first page even if only one item worked, showing a menu with the one item linked on it.

Then for the detail template I added this:
{$pagemenu}
{$leveltitle}
{$item->name}
{$item->clienttestimony}
{$item->clientshorttest}

{foreach from=$itemlist item="item"}
{$item->name}
{$item->clienttestimony}
{$item->clientshorttest}
{/foreach}

But had no luck. IT's still a blank page, except for printing out this: Array ( [alias] => Pechanga [returnid] => 16 [action] => default [inline] => [module] => portfolio )

Thanks,
C