• Resolved ustoopia

    (@ustoopia)


    Hi,
    I just wanted to let you know that with debug enabled I was receiving an error message for the Slanted theme. I fixed the issue myself by editing a line in functions.php and it no longer shows the error message for me. The error was:

    Warning: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’ (this will throw an Error in a future version of PHP) in /var/www/web33/web/wp-content/themes/slanted-master/functions.php on line 73

    So on line 73 in functions.php I changed the line mentioned in the error message to:

    $path = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

    Regards,
    Andre

Viewing 15 replies - 1 through 15 (of 36 total)
  • Theme Author Alexander Agnarson

    (@alxmedia)

    Hi,

    Thanks for reporting!

    Where did you download the theme from? Line 73 for me just has some standard add_image_size code in functions.php that should cause no issues.

    Was it some custom code you added?

    Thread Starter ustoopia

    (@ustoopia)

    There was no custom code. I downloaded it through the WP-admin pages. I should mention that I’m on a multisite environment. I should also mention that I encountered more themes that give me the exact same error so it’s probably not your code but something at my end that is causing this.

    For me line 73 had the following string in it:
    $_SERVER[REQUEST_URI] (so without the ‘ marks around REQUEST_URI).

    I added the ” and now it shows:
    $_SERVER[‘REQUEST_URI’]

    That got rid of the error message, so I’m good.
    This might be a bit naive of me but I’m pretty sure that this change won’t cause any other problems. What do you think?

    Theme Author Alexander Agnarson

    (@alxmedia)

    Ah. Hm, sounds like something on your end, as you say.

    If that fix worked for you without issues, then I’d say go with it for now, and if you run into future issues, you know what you edited and can easily change it.

    Thread Starter ustoopia

    (@ustoopia)

    Thanks. And sorry for posting this issue here before I actually did some more testing myself ??

    Great work on the slanted theme btw. I’m loving it!
    Regards,

    Theme Author Alexander Agnarson

    (@alxmedia)

    No worries, glad to hear! ??

    Hello everyone!

    I have the same problem.
    Warning: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’ (this will throw an Error in a future version of PHP) in /homepages/15/d765853453/htdocs/clickandbuilds/JaspalSampla/wp-content/themes/twentynineteen/functions.php on line 73
    I have checked the whole file (functions.php), but there is no such constant – REQUEST_URI and I have no idea how to fix it.
    Do you have any suggestions about how to fix it?
    Thanks

    Regards,
    Martin

    i have facing above same error please anybody help me.

    User $_SERVER[‘REQUEST_URI’]; instead of $_SERVER[REQUEST_URI];.
    This may solve the problem.

    Joy

    (@joydeep-chatterjee)

    The issue was regarding the twentyfourteen theme in my case (am i right @alxmedia ?) and thanks @ustoopia for the help ??

    Joy

    (@joydeep-chatterjee)

    Would appreciate help for future issues from you guys ??

    (@ustoopia)
    Thank you buddy!!!
    you save my week

    wbtech2018

    (@wbtech2018)

    hi
    same message I got
    and I can’t login to admin
    anybody can help me please

    arnaldosantos

    (@arnaldosantos)

    @wbtech2018 Você deve entrar em contato com o site de hospedagem para atualizar a vers?o do PHP e também solicitar upgrade na página de login (wp-admin)…

    bukavu

    (@bukavu)

    Just to say thank you,
    @ustoopia solution helped

    @ustoopia It Worked.

    Big Big Thanks from Blogeshwar

Viewing 15 replies - 1 through 15 (of 36 total)
  • The topic ‘Warning: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’’ is closed to new replies.