Posts: 50
Threads: 9
Joined: Sep 2014
Hi,
my server now can run php8. It seems that gs 3.3.16 does work, but there are errors thrown on some pages that uses extended i18n navigation themes. All errors seem to point to i18n:
Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in /var/www/gs3.3.16/plugins/i18n_navigation/frontend.class.php:219 Stack trace:
#0 /var/www/gs3.3.16/plugins/i18n_navigation/frontend.class.php(176): I18nNavigationFrontend::getMenuImpl(Array, 'philosophie', NULL, 100, 5)
#1 /var/www/gs3.3.16/plugins/i18n_navigation/frontend.class.php(259): I18nNavigationFrontend::getMenu('philosophie', 0, 99, 5)
#2 /var/www/gs3.3.16/plugins/i18n_navigation.php(163): I18nNavigationFrontend::outputMenu('philosophie', 0, 99, 5, NULL)
#3 /var/kunden/htdocs/selbst/df8oe/theme/andreas00/template.php(26):get_i18n_navigation(Object(SimpleXMLExtended), 0, 99, 5)
#4 /var/www/gs3.3.16/index.php(134): include('/var/customers/htd...')
#5 {main} thrown in /var/www/gs3.3.16/plugins/i18n_navigation/frontend.class.php on line 219
Pages run on php 7.4 but show error message when I enable debug mode:
Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/gs3.3.16/plugins/i18n_navigation/frontend.class.php on line 219
Any ideas how to fix that?
Posts: 515
Threads: 21
Joined: Feb 2019
Hi,
I really hope that Mvlcek reads this thread and upgrades his plugins to php8
His plugins are pure gold for the GS cms.
Otherwise someone of us has to dig in the code and do the upgrades.
Posts: 423
Threads: 15
Joined: Mar 2011
(2021-02-05, 00:12:12)df8oe Wrote: Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/gs3.3.16/plugins/i18n_navigation/frontend.class.php on line 219
Any ideas how to fix that?
Well-known issue, I thought (but can't find it in the forum now). Anyway, change line 219 in that file to:
PHP Code: 'haschildren' => $showChildren ? count((array)$children) > 0 : self::hasChildren($childurl, $show)
--
Nick.
Posts: 50
Threads: 9
Joined: Sep 2014
That fixes the problem but I think it does not sove it. It is buried now in the deep of the code and possibly will rise again in a much mire difficult way. Better is to test if the variable is an array than to cast it... https://www.php.net/manual/de/function.is-array.php
It would be great if Mvlcek reviews his code - he knows it better than anyone else... Getsimple is not dead and i18n is not, too. It is running on many websites!
Thanks for the workaround - I will add a "fixme" comment to the code there, too
Posts: 50
Threads: 9
Joined: Sep 2014
Backend now works since days without problems - everything is accessible as before. Now I tried to use admin part and there are some errors. get_magic_quotes was the simplest - but there are more. Has anyone tested php8 compatibility of the whole basic getsimple package 3.3.16?
Posts: 515
Threads: 21
Joined: Feb 2019
Hi df8oe,
Thanks for starting about GS compatibility with php8
this is really appreciated.
Let's start a project to upgrade GS where needed to php8
GS is more than worth it and you guys all know that !
I have quickly setup a GS test site with php set to version 8.0 on the host
http://php8.showme.zone/
Posts: 50
Threads: 9
Joined: Sep 2014
2021-02-16, 04:11:31
(This post was last modified: 2021-02-16, 04:19:12 by df8oe.
Edit Reason: found two other issues
)
OK - I stepped somelike forward.
admin/inc/basic.php:
put a comment sign on lines 689, 691, 692, 693
line 1194 $str must be casted to (int)
admin/changedata.php:
I found syntax I do not understand in lines 52 and 60. There is count($translit>0) - what I do not understand. I replaced it on both lines with count($translit)>0 - and now modifying pages works again.
admin/upload.php:
line 235 $dirsSorted must be casted to (array)
Also creating a new page, adding it to the menu, and deleting it works again. I cannot say if there are more issues - it would be nice if someone checks functions, too
Posts: 50
Threads: 9
Joined: Sep 2014
I cannot reproduce any more issues at the moment. This would state that GS is already at a *very high quality level*! Other Open Source software I am using (drupal 7.x, dokuwiki...) is miles after GS.
I like GS and I am using it on many domains. I will contribute modifications via GitHub. And I am testing actively if there are more issues. My server is running on Arch Linux, which always represents the bleeding edge of software without version jumps...
Posts: 3
Threads: 0
Joined: Mar 2010
Get Simple under php 8.0.2 with default theme
When adding / changing and saving component under "Edit Components"
PHP Code: Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in C:\htdocs\testsite\admin\inc\basic.php:689 Stack trace: #0 C:\htdocs\testsite\admin\components.php(56): safe_slash_html('testing') #1 {main} thrown in C:\htdocs\testsite\admin\inc\basic.php on line 689
When adding new post / editing post and saving is not possible, it ends with an error :
PHP Code: Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, bool given in C:\htdocs\testsite\admin\changedata.php:52 Stack trace: #0 {main} thrown in C:\htdocs\testsite\admin\changedata.php on line 52
Dear Get Simple developers, is there any update planned in the near future to be compatible with php8?
Posts: 515
Threads: 21
Joined: Feb 2019
Quote:Dear Get Simple developers, is there any update planned in the near future to be compatible with php8?
Yes there will be.
We need more people to post incompatible issues with php8
to speed up adapting Get Simple.
Please realize that it is not necessary to use php8 already as something
that is absolutely needed. There is nothing wrong with php7.
So in the mean time it is safe to use GS with php7.
Posts: 6,266
Threads: 181
Joined: Sep 2011
I have a plugins test repo
https://github.com/GetSimpleCMS/Plugins/...er/plugins
I will update it and we can use it for patching plugins, its dirty but better we have a diff mechanism than random forum posts
Also you should definitely be running 3.4 on php7+
Posts: 50
Threads: 9
Joined: Sep 2014
2021-05-03, 18:37:11
(This post was last modified: 2021-07-14, 14:51:12 by df8oe.)
@maxs:
All the error messages you posted I have already fixed a few posts above yours. Simply follow my instructions. I have running GS with many plugins since this time without any problems. Fixes are minor changes.
Posts: 17
Threads: 2
Joined: Mar 2015
so, the basic GS is working with PHP8, right?
Posts: 50
Threads: 9
Joined: Sep 2014
2021-07-14, 14:50:09
(This post was last modified: 2021-07-14, 14:50:37 by df8oe.)
I have patched as described above my complete GS installation and everything is working flawlessly since months with ten thousands of views.
Posts: 2
Threads: 0
Joined: Aug 2021
(2021-07-14, 14:50:09)df8oe Wrote: I have patched as described above my complete GS installation and everything is working flawlessly since months with ten thousands of views.
Hi, df8oe,
are the patched files available for Downloading? Changing them manually resulted in blank screens for me, so I'd like to avoid the pebkac.
Regards Hanns
Posts: 5
Threads: 0
Joined: May 2013
(2021-05-14, 00:36:54)brainbob Wrote: so, the basic GS is working with PHP8, right?
Still not working with php8
Posts: 5
Threads: 0
Joined: May 2013
(2021-07-14, 14:50:09)df8oe Wrote: I have patched as described above my complete GS installation and everything is working flawlessly since months with ten thousands of views.
If it's just a few files, couldn't you share / upload them somewhere? it would be very nice.
Posts: 2
Threads: 0
Joined: Aug 2021
(2021-10-05, 07:25:59)cms Wrote: (2021-07-14, 14:50:09)df8oe Wrote: I have patched as described above my complete GS installation and everything is working flawlessly since months with ten thousands of views.
If it's just a few files, couldn't you share / upload them somewhere? it would be very nice.
+1
Or could a dev (kudos) take care?
Regards Hanns
Posts: 408
Threads: 76
Joined: Nov 2017
i thing php 8.0 support is very important fix! I think is more important than 3.40 gs version.
@df8oe Please share your fixes for us
Posts: 408
Threads: 76
Joined: Nov 2017
Posts: 1,928
Threads: 88
Joined: Apr 2010
2021-11-27, 23:30:47
(This post was last modified: 2021-11-27, 23:31:08 by Oleg06.)
Will the version for php-8 be compatible with php-5.6?
Posts: 408
Threads: 76
Joined: Nov 2017
(2021-11-27, 23:30:47)Oleg06 Wrote: Will the version for php-8 be compatible with php-5.6?
i will check this and i answer you.
Posts: 408
Threads: 76
Joined: Nov 2017
(2022-11-03, 19:39:23)yuletidedull Wrote: (2021-11-27, 23:30:47)Oleg06 Wrote: Will the version for php-8 be compatible with php-5.6?krunker
Did you have the answer? I have the same questions.
Get Simple 3.3.16 ce https://multicolor-rgb.github.io is no compatible older than php 7.x
|