Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted September 19, 20168 yr 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?
September 20, 20168 yr Author 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?
September 20, 20168 yr 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.
September 21, 20168 yr Author @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'
September 21, 20168 yr 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();
September 21, 20168 yr Author OHHHHHH, i'm so sorry, i dont know why i thought you meant URL::External. My bad
Archived
This topic is now archived and is closed to further replies.