× Here you can get community support related to ReDJ.

Blank pages after redirection

  • kalixo
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 1 month ago #4738 by kalixo
Blank pages after redirection was created by kalixo
Dear REDJ,
after logging into google webmaster tools I found out that I have a lot of 404's.
Most of them was giving the error:
Catchable fatal error: Object of class Sh404sefClassRouter could not be converted to string in /plugins/system/redj/redj.php on line 688
You wrote some lines in my eariler post that made this problem solved before, but I comed again. I've updated your plugin to the newest version, and after that the problem still exists but this time the page is still not generated correct and it brings without information of the error.

examples:
FROM: darmolandia(dot)pl/za-darmo/casting-szansa-na-sukces-za-darmo-tvp2.html
TO: darmolandia(dot)pl/za-darmo/casting-szansa-na-sukces-za-darmo-tvp2

FROM: darmolandia(dot)pl/2015101710090/15101707
TO: darmolandia(dot)pl/%7Bpreg_match%202%7D/%5C/%28%5B0-9%5D+%29%5C/%28.*%29/i%7B/preg_match%7D

FROM: darmolandia(dot)pl/za-darmo/10-z%C5%82-do-sklepu-alma-za-darmo.html
TO: darmolandia(dot)pl/za-darmo/10-z%C5%82-do-sklepu-alma-za-darmo

Looking forward to hear from you, and thanks!
Kalixo

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #4742 by admin
Replied by admin on topic Blank pages after redirection
Hi,
unfortunately I cannot replicate the issue so you should help me to test the potential fix.

Change this block:
    // Call saved exception handler
    if (is_callable($GLOBALS["_REDJ_EXCEPTION_HANDLER"]))
    {
      call_user_func($GLOBALS["_REDJ_EXCEPTION_HANDLER"], $error);
    }

With this block:
    // Call saved exception handler
    $exception_handler = (gettype($GLOBALS["_REDJ_EXCEPTION_HANDLER"]) == 'object') ? get_class($GLOBALS["_REDJ_EXCEPTION_HANDLER"]) : $GLOBALS["_REDJ_EXCEPTION_HANDLER"];
    if (is_callable($exception_handler) call_user_func($exception_handler, $error);

And let me know.

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

  • kalixo
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 1 month ago #4747 by kalixo
Replied by kalixo on topic Blank pages after redirection
Dear Luigi,
Thansk for the lines, but it seems that there is a syntax error in the last line:
if (is_callable($exception_handler) call_user_func($exception_handler, $error);
could you validate that?

Thanks!

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #4748 by admin
Replied by admin on topic Blank pages after redirection
Sorry,
missed a parenthesis:
    // Call saved exception handler
    $exception_handler = (gettype($GLOBALS["_REDJ_EXCEPTION_HANDLER"]) == 'object') ? get_class($GLOBALS["_REDJ_EXCEPTION_HANDLER"]) : $GLOBALS["_REDJ_EXCEPTION_HANDLER"];
    if (is_callable($exception_handler)) call_user_func($exception_handler, $error);
The following user(s) said Thank You: kalixo

Please Log in or Create an account to join the conversation.

  • kalixo
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 1 month ago #4766 by kalixo
Replied by kalixo on topic Blank pages after redirection
Luigi, thank you, but It didn't resovled the whole problem. I don't get any error now but the page is still not loading.

In Google analitycs i can find a lot of 404's that I can divide in two cases:
1. Those which are giving the result page with url:
darmolandia(dot)pl/%7Bpreg_match%202%7D/%5C/%28%5B0-9%5D+%29%5C/%28.*%29/i%7B/preg_match%7D
with egzample sources:
darmolandia(dot)pl/2015100810023/15100802 the redirect should point to: darmolandia(dot)pl/15100802
darmolandia(dot)pl/201509019823/promocja-yves-rocher-prezenty-do-zakupu-gratis-kosmetyki-reczniki-i-organizery that shoud redirect to: darmolandia(dot)pl/promocja-yves-rocher-prezenty-do-zakupu-gratis-kosmetyki-reczniki-i-organizery

2. Those which are giving the result page without redirection and the page is not generating:
darmolandia(cot)pl/za-darmo/6000-z%C5%82-za-twoj%C4%85-opini%C4%99.html it points to the url: darmolandia(dot)pl/za-darmo/6000-z%C5%82-za-twoj%C4%85-opini%C4%99 but it should poin to: darmolandia(dot)pl/6000-z%C5%82-za-twoj%C4%85-opini%C4%99

Could you please look at those?

Thanks in advance, Kalixo

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #4767 by admin
Replied by admin on topic Blank pages after redirection
Hi Kalixo,
so the problem with the code is fixed. Now you have problems with redirections, and this is a different problem.

The first problem seems related to the macro {preg_match} which is available only in the enterprise version, while you are using the community.

About the second problem, I don't understand how could I help you. I don't know all your redirection rules...

Please Log in or Create an account to join the conversation.

Time to create page: 0.092 seconds