Welcome Guest, Not a member yet? Register   Sign In
Issue with site_url() after upgrade to 4.5.5
#1

(This post was last modified: 11-23-2024, 03:07 PM by SoccerGuy3.)

Upgraded my site from 4.3.8 to 4.5.5 this morning. I have gone through all the changes version by version and have the site basically running again. One issue that has me completely stopped is the behavior of site_url(). I know there were breaking changes around 4.4, but I can't for the life of me see how they apply in this case. What I have...
In my .env file:
PHP Code:
app.baseURL 'https://domain.com/'

app.indexPage '' 


In my view file:
PHP Code:
<class="nav-link" href="<?= site_url() ?>" target="_blank"


In 4.3.8 (and before) this returned:
PHP Code:
<class="nav-link" href="https://domain.com" target="_blank"


In 4.5.5 it is returning:
PHP Code:
<class="nav-link" href="" target="_blank"

If I put a value in:
PHP Code:
app.indexPage 'index' 

I get (in 4.5.5):
PHP Code:
<class="nav-link" href="https://index/index" target="_blank"
If I use the example from the docs (with the original .env file settings):
PHP Code:
<class="nav-link" href="<?= site_url('news/local/123'); ?>" target="_blank"

I get:
PHP Code:
<class="nav-link" href="https://news/news/local/123" target="_blank"


Is there a setting somewhere I missed during the upgrades? Am I missing something obvious in the docs?
Help!
Reply


Messages In This Thread
Issue with site_url() after upgrade to 4.5.5 - by SoccerGuy3 - 11-23-2024, 03:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB