Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
0xMerlin Posted September 19, 2016 Posted September 19, 2016 I have a script that is in the root directory of the forums that starts with <?php $_SERVER['SCRIPT_FILENAME'] = __FILE__; require_once 'init.php'; \IPS\Dispatcher\Front::i()->init(); it is crashing on the ->init(); now that I updated to 4.1.14.3 Any ideas why this causes a crash saying the page doesn't exist (in devmode it says a 500 error) and isn't logging any thing to error_log or the internal logging?
0xMerlin Posted September 20, 2016 Author Posted September 20, 2016 I found the issue. Dispatcher\Front.php added in internal URL checking as well as $url->base !== 'front' which is breaking the app. Since the app is its own page and calls in the IPB methods, this causes the base to be empty which triggers the 404 code. The only way i could bypass this was to alter the IPB code to add an exception for my page. Is there a better way to do this than always alter the Front.php in every update?
TSP Posted September 20, 2016 Posted September 20, 2016 1 hour ago, 0xMerlin said: Is there a better way to do this than always alter the Front.php in every update? They added \IPS\Dispatcher\External::i() for this recently. Try that.
0xMerlin Posted September 21, 2016 Author Posted September 21, 2016 @TSP Not sure where I would put this as when the user visits http://mysite.com/mypage.php it detects the call in there when I call the Dispatcher\Front as an internal link but the $url-base is empty when the else if statement is detecting it as 'front'
TSP Posted September 21, 2016 Posted September 21, 2016 I'm not sure I understand what you mean. You would just replace Front with External in that script. <?php $_SERVER['SCRIPT_FILENAME'] = __FILE__; require_once 'init.php'; \IPS\Dispatcher\External::i()->init();
0xMerlin Posted September 21, 2016 Author Posted September 21, 2016 OHHHHHH, i'm so sorry, i dont know why i thought you meant URL::External. My bad
Recommended Posts
Archived
This topic is now archived and is closed to further replies.