Jump to content

Warning people when the URL is invalid


rct2·com

Recommended Posts

Posted

All this weekend, I have almost literally been tearing my hair out trying to debug a problem with an app I've been developing for IPB3. A debug statement in the top of index.php to var_dump($_GET) said that it was empty, but it turns out that it wasn't. That's an Apache/PHP bug/problem I think. It turns out that the root cause of my problem was that I hadn't got my code and folder structure quite correct, so that IPB couldn't find my application's executable code. Because of this, it was defaulting to the root URL for the board.

It would have been nice [and I would have slightly more hair] if IPB3 had given a warning message stating that although the application was registered in AdminCP, it couldn't work out which code to execute. Perhaps this type of warning could be given only if IN_DEV mode is switched on?

Posted

I agree wholeheartedly with this. I ran into similar problems while trying to throw together an AdminCP application last week. The application was visible in the My Apps dropdown, and the URL looked correct, but clicking it would lead to the same issues you were seeing on the board: directed back to the index page with the application part of the URL stripped off and no error message. Without seeing what the problem is, it's hard to fix it.

Posted

Will consider it in the next release when IN_DEV is on. I can see how it would be useful. :)

(Note for the record to save you a few strands of hair next time hopefully - if your class name is invalid it will do the same thing (e.g. "admin_blah_blah_blah1" if it is supposed to be "admin_blah_blah_blah" will cause the same thing).

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...