Rob Pearson Posted May 30, 2017 Share Posted May 30, 2017 Hello On our custom error page we insert the IPB tags (error_message) as shown in image one: However upon access a restricted page and then revisiting the code it removed the IPB tags and replaced them with text. This means that error are no longer identified properly on our pages. It instead says 'sorry you do not have permission to view this page. See image below. Surely the tags should remain so it can present different reasons/errors. I look forward to getting this resolved. Thanks Rob Link to comment Share on other sites More sharing options...
Rob Pearson Posted June 1, 2017 Author Share Posted June 1, 2017 anyone able to help? Link to comment Share on other sites More sharing options...
Daniel F Posted June 3, 2017 Share Posted June 3, 2017 The errors are replaced on runtime in following method cms/Pages::errorPage /** * Show a custom error page * * @param string $title Title of the page * @param string $message language key for error message * @param mixed $code Error code * @param int $httpStatusCode HTTP Status Code * @param array $httpHeaders Additional HTTP Headers * @return void */ static public function errorPage( $title, $message, $code, $httpStatusCode, $httpHeaders ) { try { $page = static::load( \IPS\Settings::i()->cms_error_page ); $page->content = str_replace( '{error_message}', $message, $page->content ); $page->content = str_replace( '{error_code}', $code, $page->content ); ... If you want to customize here something, you'll have to create a plugin and override this method. Link to comment Share on other sites More sharing options...
Rob Pearson Posted June 3, 2017 Author Share Posted June 3, 2017 Hello @Daniel F, Thanks for the response. I'm not looking to override the system i just want to know why when using the (error_message) tag it doesn't work and converts the tags into text. Surely using the tag means it would detect different errors or is that not the case with custom error pages? Thanks Rob Link to comment Share on other sites More sharing options...
Rob Pearson Posted June 5, 2017 Author Share Posted June 5, 2017 It just seems the custom error tag doesn't detect the different errors but instead just checks the first one and then saves it as text. Still not found a solution yet. Link to comment Share on other sites More sharing options...
Rob Pearson Posted June 7, 2017 Author Share Posted June 7, 2017 @Daniel F could you possibly help with this? Link to comment Share on other sites More sharing options...
Rob Pearson Posted June 11, 2017 Author Share Posted June 11, 2017 Anyone have a solution please? Link to comment Share on other sites More sharing options...
opentype Posted June 11, 2017 Share Posted June 11, 2017 Removed. See next post. Link to comment Share on other sites More sharing options...
opentype Posted June 11, 2017 Share Posted June 11, 2017 Okay, I tried it and see the problem. That is actually a bug. Please open a ticket for that. The error page TEMPLATE gets changed once used, not just the front-end output. That’s clearly not intentional, but it wasn’t perfectly clear from your first post. Not sure what version you use, but I can confirm it for the latest 4.2 beta as well. Link to comment Share on other sites More sharing options...
Rob Pearson Posted June 11, 2017 Author Share Posted June 11, 2017 Ok fantastic. Ill report it now @opentype Link to comment Share on other sites More sharing options...
Ryan Ashbrook Posted June 13, 2017 Share Posted June 13, 2017 This will be fixed in the next release. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.