• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: RegisterRoute troubles in module upgrade
PostPosted: Wed Oct 16, 2019 3:22 pm 
Offline
Forum Members
Forum Members

Joined: Wed Aug 20, 2008 3:04 pm
Posts: 50
Hello,

I'm trying to port a custom module from a 1.x version of cmsms to the latest 2.2.x version. Most things are fine but I'm having trouble with RegisterRoute as what worked before no longer appears to function in quite the same manner.

The SetParameters function has been split into InitializeFrontend and InitializeAdmin, thus:

\$1:
function InitializeFrontend() {
$this->RegisterRoute('/detail\/(?P<refMunged>[^\/]+)\/(?P<titleMunged>[^\/]+)$/i',array('returnid'=>$pageID,'action'=>'detail'));

$this->RegisterRoute('/search\/not-found$/i',array('returnid'=>$pageID,'action'=>'default','invalidRef'=>true));

$this->SetParameterType('refMunged',CLEAN_STRING);
$this->SetParameterType('titleMunged',CLEAN_STRING);
}

function InitializeAdmin() {
$this->CreateParameter('refMunged','');
$this->CreateParameter('titleMunged','');
}


Lazy loading is deactivated for now as I understand that requires static routes, am I right?

We are passing certain variables in the RegisterRoute function, such as the returnid as we've set them via a preference rather than have them in the url, I prefer it that way.

The sort of urls we are passing are like:

https://example.com/detail/zzxd_1235671239/badgers-are-us.html

The structure of the urls is unchanged between the versions and the regular expressions are the same too.

Can anyone suggest what I've omitted or where I should start looking for the issue? The error log is not giving me any information.

Thanks,

Mark.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting