Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » URL Handler Problem

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 397 Views
  • Bob Martin
    Avatar
    Community Member
    5 Posts

    URL Handler Problem Link to this post

    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

    397 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.