I just watched your YT video and was going to try out the new cms feature but I got this from a new setup. any help would be appreciated and am wondering if I am the only one since I don't see anywhere where others are having problem.
Parse error: syntax error, unexpected '|', expecting ';' or '{' in C:\xampp\htdocs\july\modules\trongate_pages\controllers\Trongate_pages.php on line 28
line 28
function _make_sure_allowed(): string|false {
//by default, 'admin' users (i.e., users with user_level_id === 1) are allowed
$this->module('trongate_security');
$token = $this->trongate_security->_make_sure_allowed();
return $token;
}
So no one else has this from fresh setup of new app?
The new pages module....
3 years ago
3 years ago
#1
3 years ago
#2
Hi lunaticthrasher,
I can't recreate your issue - can you please explain in detail where it is happening to you?
I'm on Windows 11, with Xammp, Apache/2.4.56 (Win64) OpenSSL/1.1.1t PHP/8.1.17, 10.4.28-MariaDB
I just went through the installation of a new app, using the desktop app, I then jumped to the new app in my browser, and it asked me to apply the SQL, which I did. The welcome page loaded as expected. I then clicked on the admin button, where I had to log in (user - admin, pw - admin). I then created a test page and saved it. I then clicked on the settings 'cog' icon and made the page 'published'. Then I navigated to the public page and all was good.
Cheers,
Si
I can't recreate your issue - can you please explain in detail where it is happening to you?
I'm on Windows 11, with Xammp, Apache/2.4.56 (Win64) OpenSSL/1.1.1t PHP/8.1.17, 10.4.28-MariaDB
I just went through the installation of a new app, using the desktop app, I then jumped to the new app in my browser, and it asked me to apply the SQL, which I did. The welcome page loaded as expected. I then clicked on the admin button, where I had to log in (user - admin, pw - admin). I then created a test page and saved it. I then clicked on the settings 'cog' icon and made the page 'published'. Then I navigated to the public page and all was good.
Cheers,
Si
3 years ago
#3
Union return types was added in PHP 8.0
I assume this is due to using an older version of PHP. :)
I assume this is due to using an older version of PHP. :)
3 years ago
#4
Now that I see your replies I am sure it's my xammp version, I think I still got it running 7.2 php or so because that's what my service is still at, I'll check and make sure when I get home.
3 years ago
#5
Hi Tom, sasin91 is correct with the union types and there is nothing wrong with your Xampp install be it v7.2. I swapped my version of PHP from v8.1.17 to 7.4.33 and I get the same union type error you are seeing when you goto the admin panel of
So all you need to do is open the controller for 'Trongate_pages.php' and remove the union type on lines 28
to this:
and 663
to this
Hope that helps Tom.
Cheers
Si
So all you need to do is open the controller for 'Trongate_pages.php' and remove the union type on lines 28
to this:
and 663
to this
Hope that helps Tom.
Cheers
Si
3 years ago
#6
Thank you Dafa, That worked like a charm. You sure do help out in the pinch when I have them, much appreciated.