Creating a new page sends me to /$url once trying to visit it!

Permalink
Hi
concrete5 5.6.0.2 installed.
was working fine until now
Nothing specific installed (apart from a custom made theme and the nd php block)
when we add a page (from the full sitemap, or adding a page from another page), and then we try to visit it, we end up on /$url (which of course gives a 404 error)

the page is correctly set in the database (it seems...)

we have tried to reupload the contrete forlder from 6.5.0.2, still no luck.

any idea?

 
epurple replied on at Permalink Reply
the weird thing is that it works fine for the other pages (created earlier...)
now i have this issue on another server... so i believe it is more a server config issue than concrete5.
however, help would be appreciated
thanks

EDIT:
actually, i found something:
this is linked to an element (which is loaded in a GlobalArea)
It is pretty simple, but it seems that the issue disappear when removing this element.
The only thing this element does is a switch on the page name
$page = Page::getCurrentPage();
$pageName = $page->getCollectionName();


unsure why this is causing an issue though. i can find a work around, but, understanding it would be great
epurple replied on at Permalink Reply
Ok.
My apologies to the c5 community for spamming :)

in the 'default' of the switch, there was:
$url = BASE_URL.DIR_REL';
header('Location: $url');


which of course should be
header('Location: '.$url);