Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

URL Handler Problem


Reply


517 Views

Avatar
Bob Martin

Community Member, 5 Posts

14 June 2012 at 12:45am

Hi there,

I've defined an URL handler in my page Controller in the following way:

public static $url_handlers = array(
'$what!/$id!//$someText' => 'show'
);

It works generally, the show()-function gets called and does her job. However, I receive a lot of warning mails by the SS_LogEmailWriter containing this message:

Warning: popCurrent called on ModelAsController controller, but it wasn't at the top of the stack
At line 454 in /home/cotec-it-systeme/www/sapphire/core/control/Controller.php

popCurrent called on ModelAsController controller, but it wasn't at the top of the stack
Line 454 of Controller.php
Controller->popCurrent()
Line 76 of ModelAsController.php
ModelAsController->handleRequest(SS_HTTPRequest)
Line 282 of Director.php
Director::handleRequest(SS_HTTPRequest,Session)
Line 125 of Director.php
Director::direct(/referenzen/r/7/unsubscribe/assets/Support/TeamViewerQSde.exe)
Line 127 of main.php

The problem seems to be the parsed URL, but I have no influence on that. So I'm looking for a way to make the handler ignore noncorrect urls. Maybe this is just a matter of configuration.
'$what!/$id!//$someText' is used to create a speaking URL, $someText ist never evaluated, but needs to be declared in order not to get an error when I call an URL like '/referenzen/r/7/Description'. This works, but when I call '/referenzen/r/7/Description/anotherDescription' I get the error above.

How can I solve this?

Martin