Custom 404 Page by Siropu

Custom 404 Page by Siropu 1.1.7

No permission to download
Thanks @Alfa1 , those links are no longer present in our database but apparently used by some search engines and bots. If they were just few and between we’d simply ignore them, however, we get hundreds of them daily.
 
Does anyone know what are those "like"errors? ._.
I think people who used XF 2.0 and then upgraded to 2.1 get these errors.

I think it is a bug @Chris D as many people reported it.

 
Is this error something to do with this addon?
PHP:
InvalidArgumentException: Received invalid UTF-8 for string column [url] src/XF/Mvc/Entity/Entity.php:740
Generated by: Unknown account Jun 21, 2019 at 11:36 PM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType('https://www.dom...', 'url', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('url', 'https://www.dom...')
#2 src/addons/Siropu/Custom404Page/Listener.php(57): XF\Mvc\Entity\Entity->__set('url', 'https://www.dom...')
#3 [internal function]: Siropu\Custom404Page\Listener::appPubComplete(Object(XF\Pub\App), Object(XF\Http\Response))
#4 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#5 src/XF/App.php(2647): XF\Extension->fire('app_pub_complet...', Array, NULL)
#6 src/XF/Pub/App.php(462): XF\App->fire('app_pub_complet...', Array)
#7 src/XF/App.php(2180): XF\Pub\App->complete(Object(XF\Http\Response))
#8 src/XF.php(390): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}

-------------

Previous InvalidArgumentException: Received invalid UTF-8 for string column - src/XF/Mvc/Entity/ValueFormatter.php:126
#0 src/XF/Mvc/Entity/Entity.php(736): XF\Mvc\Entity\ValueFormatter->castValueToType('https://www.dom...', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType('https://www.dom...', 'url', 5, Array)
#2 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('url', 'https://www.dom...')
#3 src/addons/Siropu/Custom404Page/Listener.php(57): XF\Mvc\Entity\Entity->__set('url', 'https://www.dom...')
#4 [internal function]: Siropu\Custom404Page\Listener::appPubComplete(Object(XF\Pub\App), Object(XF\Http\Response))
#5 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#6 src/XF/App.php(2647): XF\Extension->fire('app_pub_complet...', Array, NULL)
#7 src/XF/Pub/App.php(462): XF\App->fire('app_pub_complet...', Array)
#8 src/XF/App.php(2180): XF\Pub\App->complete(Object(XF\Http\Response))
#9 src/XF.php(390): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}
Request state
array(4) {
  ["url"] => NULL
  ["referrer"] => string(25) "https://www.domain.com/"
  ["_GET"] => array(1) {
    [""] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}



InvalidArgumentException: Received invalid UTF-8 for string column [url] src/XF/Mvc/Entity/Entity.php:740
Generated by: Unknown account Jun 21, 2019 at 11:36 PM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType('https://www.dom...', 'url', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('url', 'https://www.dom...')
#2 src/addons/Siropu/Custom404Page/Listener.php(57): XF\Mvc\Entity\Entity->__set('url', 'https://www.dom...')
#3 [internal function]: Siropu\Custom404Page\Listener::appPubComplete(Object(XF\Pub\App), Object(XF\Http\Response))
#4 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#5 src/XF/App.php(2647): XF\Extension->fire('app_pub_complet...', Array, NULL)
#6 src/XF/Pub/App.php(462): XF\App->fire('app_pub_complet...', Array)
#7 src/XF/App.php(2180): XF\Pub\App->complete(Object(XF\Http\Response))
#8 src/XF.php(390): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}

-------------

Previous InvalidArgumentException: Received invalid UTF-8 for string column - src/XF/Mvc/Entity/ValueFormatter.php:126
#0 src/XF/Mvc/Entity/Entity.php(736): XF\Mvc\Entity\ValueFormatter->castValueToType('https://www.dom...', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType('https://www.dom...', 'url', 5, Array)
#2 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('url', 'https://www.dom...')
#3 src/addons/Siropu/Custom404Page/Listener.php(57): XF\Mvc\Entity\Entity->__set('url', 'https://www.dom...')
#4 [internal function]: Siropu\Custom404Page\Listener::appPubComplete(Object(XF\Pub\App), Object(XF\Http\Response))
#5 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#6 src/XF/App.php(2647): XF\Extension->fire('app_pub_complet...', Array, NULL)
#7 src/XF/Pub/App.php(462): XF\App->fire('app_pub_complet...', Array)
#8 src/XF/App.php(2180): XF\Pub\App->complete(Object(XF\Http\Response))
#9 src/XF.php(390): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}
Request state
array(4) {
  ["url"] => NULL
  ["referrer"] => string(25) "https://www.domain.com/"
  ["_GET"] => array(1) {
    [""] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
Thanks!
 
Hello @Siropu ,

I would like to know if the variable dump in the template "siropu_custom_404_page_content" was normal or it was accidentally dragged during a debug?

205149
 
PHP:
Server error log
InvalidArgumentException: Received invalid UTF-8 for string column [url] src/XF/Mvc/Entity/Entity.php:740
Generated by: User Jun 26, 2019 at 12:40 PM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType('https://www.dom...', 'url', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('url', 'https://www.dom...')
#2 src/addons/Siropu/Custom404Page/Listener.php(57): XF\Mvc\Entity\Entity->__set('url', 'https://www.dom...')
#3 [internal function]: Siropu\Custom404Page\Listener::appPubComplete(Object(XF\Pub\App), Object(XF\Http\Response))
#4 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#5 src/XF/App.php(2647): XF\Extension->fire('app_pub_complet...', Array, NULL)
#6 src/XF/Pub/App.php(462): XF\App->fire('app_pub_complet...', Array)
#7 src/XF/App.php(2180): XF\Pub\App->complete(Object(XF\Http\Response))
#8 src/XF.php(390): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}

-------------

Previous InvalidArgumentException: Received invalid UTF-8 for string column - src/XF/Mvc/Entity/ValueFormatter.php:126
#0 src/XF/Mvc/Entity/Entity.php(736): XF\Mvc\Entity\ValueFormatter->castValueToType('https://www.dom...', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType('https://www.dom...', 'url', 5, Array)
#2 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('url', 'https://www.dom...')
#3 src/addons/Siropu/Custom404Page/Listener.php(57): XF\Mvc\Entity\Entity->__set('url', 'https://www.dom...')
#4 [internal function]: Siropu\Custom404Page\Listener::appPubComplete(Object(XF\Pub\App), Object(XF\Http\Response))
#5 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#6 src/XF/App.php(2647): XF\Extension->fire('app_pub_complet...', Array, NULL)
#7 src/XF/Pub/App.php(462): XF\App->fire('app_pub_complet...', Array)
#8 src/XF/App.php(2180): XF\Pub\App->complete(Object(XF\Http\Response))
#9 src/XF.php(390): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}
Request state
array(4) {
  ["url"] => NULL
  ["referrer"] => string(35) "https://www.domain.com/forums/74/"
  ["_GET"] => array(1) {
    [""] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}


Server error log
InvalidArgumentException: Received invalid UTF-8 for string column [url] src/XF/Mvc/Entity/Entity.php:740
Generated by: User Jun 26, 2019 at 12:40 PM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType('https://www.dom...', 'url', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('url', 'https://www.dom...')
#2 src/addons/Siropu/Custom404Page/Listener.php(57): XF\Mvc\Entity\Entity->__set('url', 'https://www.dom...')
#3 [internal function]: Siropu\Custom404Page\Listener::appPubComplete(Object(XF\Pub\App), Object(XF\Http\Response))
#4 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#5 src/XF/App.php(2647): XF\Extension->fire('app_pub_complet...', Array, NULL)
#6 src/XF/Pub/App.php(462): XF\App->fire('app_pub_complet...', Array)
#7 src/XF/App.php(2180): XF\Pub\App->complete(Object(XF\Http\Response))
#8 src/XF.php(390): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}

-------------

Previous InvalidArgumentException: Received invalid UTF-8 for string column - src/XF/Mvc/Entity/ValueFormatter.php:126
#0 src/XF/Mvc/Entity/Entity.php(736): XF\Mvc\Entity\ValueFormatter->castValueToType('https://www.dom...', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType('https://www.dom...', 'url', 5, Array)
#2 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('url', 'https://www.dom...')
#3 src/addons/Siropu/Custom404Page/Listener.php(57): XF\Mvc\Entity\Entity->__set('url', 'https://www.dom...')
#4 [internal function]: Siropu\Custom404Page\Listener::appPubComplete(Object(XF\Pub\App), Object(XF\Http\Response))
#5 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#6 src/XF/App.php(2647): XF\Extension->fire('app_pub_complet...', Array, NULL)
#7 src/XF/Pub/App.php(462): XF\App->fire('app_pub_complet...', Array)
#8 src/XF/App.php(2180): XF\Pub\App->complete(Object(XF\Http\Response))
#9 src/XF.php(390): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}
Request state
array(4) {
  ["url"] => NULL
  ["referrer"] => string(35) "https://www.domain.com/forums/74/"
  ["_GET"] => array(1) {
    [""] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
Request: I currently have a custom 404 page I'm using but find the logging feature of this add-on extremely useful and user friendly. Could you add an option to use a custom 404 page url as a second option instead of just the 404 page content box.

Suggestion: Add the option to log additional 4xx Client Errors. For example sometimes I wonder if some pages that are giving a 410 Gone and are being hit a lot, it would probably benefit traffic on the site to redirect them to an actual content page. Logging the 410 errors with your add-on would give me the ability to see this quickly and make the necessary changes.

Thanks for a great add-on.
 
If you enable the option "Display content only", you can display only what you insert in the content box where you can add the HTML code of your own custom 404 page.
 
Request: I currently have a custom 404 page I'm using but find the logging feature of this add-on extremely useful and user friendly. Could you add an option to use a custom 404 page url as a second option instead of just the 404 page content box.

You have to decide on the links that appear in the log, what kind of these are and then enter them in their .htaccess so that they are redirected before they reach the forum itself. Content that is not available in the forum will be redirected to a redirectpermanent 410 ...
For this Siropus Tool would be one instance too high and because of the performance the wrong place.
 
Thanks for the update, @Siropu ! :)

Unfortunately, the selection still doesn't work across multiple pages. While you can mass-select URLs, individually selected links still don't remain selected over more than one page.
 
While you can mass-select URLs, individually selected links still don't remain selected over more than one page.
The option I added is for mass selection only. What you want is the checked items on other pages to get deleted as well when you submit, right?
Should I provide you the DB content?
If you get that error, the url doesn't get saved.
 
  • Sad
Reactions: rdn
Top Bottom