_vars = &$view->_vars; $this->data = &$view->data; replace with: $this->_vars = ""; if(isset($view->_vars ) && $view->_vars != ""){ $this->_vars = &$view->_vars;} $this->data = ""; if(isset($view->data ) && $view->data != ""){ $this->data = &$view->data; } Unfortunately after installing Connectivity you will have to perform same actions again; 3. to minimize error on view form "Attempt to modify property "_vars" on null" open /libraries/cegcore2/libs/composer.php find and comment line ​$this->_vars = &$app->_vars; replace with: $this->_vars = ""; if(isset($app->_vars ) && $app->_vars != ""){ $this->_vars = &$app->_vars; That is all i found by now. [br] Let you know if there is something else. [br] [br] NB! this is for CF6 and CCv6 only; however I do believe this will work for Cf7 too. [br] The only difference is that cegcore2 there is called chronog3 and is located in /plugins/system/chronog3_plg/chronog3/libs[br] [br] Please, correct me and add your findings. [br] Still hope Max will join us soon!!![br] [br] Elita[br]"> Chronoforms with PHP8 and Joomla 4 - Forums

Forums

Chronoforms with PHP8 and Joomla 4

Elita 09 Oct, 2021
2 Likes
hello to ALL Chronoforms community!

It seems that Max, as far as I know - the only developer of Chronoforms has dissapeared for almost 5 months now... Last time I heard from him was May.
So far for that there is Joomla4 and PHP8 already introduced;

I would like to suggest all the community to join hands and help Chronoforms to live further till Max will be able to take over.



Many of Chronoengine.com members have huge (including me) projects realized with Chronoforms that is still the most poverful, user - friendly tool. I must admit that last couple of months I have been searching for similar tool - and did not find any - there is not such tool available!!!
So - my suggestion is - lets everybody make an effort to give Chronoforms to live further.

Here are my findings so far:

1. There are some minor changes (code hacks) needed (at least I found so far; still testing) to switch to PHP 8; that I will describe later;
2. Joomla 3.10.x versions are transitions from Joomla 3 to Joomla 4 - that means that it contains BOTH new and depreciated code AND will be supported for 2 more years (August 17, 2023). Til then, hope, Max will be back.
3. Joomla 4 have many major changes and needs further investigation of CF code to make it work; still hope that Max will soon take over; till then any knowledge of the CF community would be appreciated; We can post here or make another post to share our findings.
[blockquote]
About the hacks to continue CF working on PHP8:[/blockquote]


1. the error "Call to undefined function get_magic_quotes_gpc() "

locate folder /libraries/cegcore2

open gcloader.php

comment block (line 63-71):
[pre]
if(get_magic_quotes_gpc()){
function stripslashes_gpc(&$value){
$value = stripslashes($value);
}
array_walk_recursive($_GET, 'stripslashes_gpc');
array_walk_recursive($_POST, 'stripslashes_gpc');
array_walk_recursive($_COOKIE, 'stripslashes_gpc');
array_walk_recursive($_REQUEST, 'stripslashes_gpc');
}[/pre]

2. then you'll get the error "Attempt to modify property "_vars" on null"

open /libraries/cegcore2/libs/helper.php

find and comment two lines:


$this->_vars = &$view->_vars;
$this->data = &$view->data;

replace with:

$this->_vars = "";
if(isset($view->_vars ) && $view->_vars != ""){
$this->_vars = &$view->_vars;
}
$this->data = "";
if(isset($view->data ) && $view->data != ""){
$this->data = &$view->data;
}


Unfortunately after installing Connectivity you will have to perform same actions again;


3. to minimize error on view form "Attempt to modify property "_vars" on null"

open /libraries/cegcore2/libs/composer.php

find and comment line
$this->_vars = &$app->_vars;

replace with:


$this->_vars = "";
if(isset($app->_vars ) && $app->_vars != ""){
$this->_vars = &$app->_vars;

That is all i found by now.
[br] Let you know if there is something else. [br] [br] NB! this is for CF6 and CCv6 only; however I do believe this will work for Cf7 too. [br] The only difference is that cegcore2 there is called chronog3 and is located in /plugins/system/chronog3_plg/chronog3/libs[br] [br] Please, correct me and add your findings. [br]

Still hope Max will join us soon!!!


[br] [br] Elita[br]
Colnem 10 Oct, 2021
Thanks Elita

I search on my side.
I've just found the first fix ("cegcore2\gxcloader") to log as admin: replacing "get_magic_quotes_gpc() " by "PHP_VERSION_ID < 50400 && get_magic_quotes_gpc()"

I can't try all your job because I've another plugin with bugs under PHP8...
Elita 14 Oct, 2021
with PHP8

Error that occurs with backup download (both CF6 and CCv6):
preg_replace() expects at least 3 arguments, 2 given

found that arguments should be - preg_replace($patterns, $replacements, $string)

Maxe's code:

administrator/components/com_chronoforms6/chronoforms/controllers/connections.php
starting at line 371
and
administrator/components/com_chronoconnectivity6/chronoconnectivity/controllers/connections.php
starting at line 188
 if(preg_replace('Opera(/| )([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT'])){
$UserBrowser = 'Opera';
}elseif(preg_replace('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT'])){
$UserBrowser = 'IE';
}else{
$UserBrowser = '';
}
should contain argument $replacements
I simply added argument ' ' - seems to be working;
not quite sure why Max put this all code on a first place - why check for Opera and IE for file download?
Perhaps this code could be minimized?

the working code is as follows:
 if(preg_replace('Opera(/| )([0-9].[0-9]{1,2})',' ', $_SERVER['HTTP_USER_AGENT'])){
$UserBrowser = 'Opera';
}elseif(preg_replace('MSIE ([0-9].[0-9]{1,2})',' ', $_SERVER['HTTP_USER_AGENT'])){
$UserBrowser = 'IE';
}else{
$UserBrowser = '';
}
Elita 15 Oct, 2021
Hi, thanks for the input. My opinion ist that there is no need to care about the depreciated php versions, so my suggestion is to delete or comment all the code that refers to get_magic_quotes. do you think we should?
Colnem 18 Oct, 2021
Hi

Thanks

I presume we have to replace "preg_replace" by "preg_match"...
I'll try later...

Bye
Max_admin 03 Dec, 2021
v7 should be now J4 and PHP8 ready!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Colnem 04 Dec, 2021
HI

Thanks, Max, for this job.

Two questions:
1 - Are CF6 and CV6 ready for PHP8?
2 - In CF7 (ready for J4), is the SSQL "NOT IN" bug fixed?

Thanks
Colnem 04 Dec, 2021
Beware, guys!

The bug with SQL 'NOT IN' condition is not fixed in PHP8/Joomla4 version.

Look at this topic:
Colnem 05 Dec, 2021
VERY VERY IMPORTANT: DON'T INSTALL THE NEW VERSION PHP8/JOOMLA 4 under PHP7.3 and Joomla 3.x !!!

There is a big bug with SQL WHERE CONDITION:
If you modify one condition, all yours conditions disappear when closing and opening the form!

I've tried, under PHP7.3 and Joomla 3.X, with the Demo form Basic Article List and I confirm this bug.

Colnem

Edit 2021-12-18: same bug with Joomla 4.05 (empty new site), PHP 7.4, Chronoforms7 V.08.
typomaniac 06 Dec, 2021
Hi Max
does this mean that the download section now delivers the J4-ready version? I'm a bit confused, as in the dropdown, there still are just the options J3 and WP.
Could you somehow open a new forum category about the ongoing J4 project? Would be great. It's a bit difficult to find news about this.

Thanks so much

Martin

b.t.w. So great to have you back!!!! 🙂
spytech 11 Dec, 2021
I think it would be good to fix version 6 as we have loads of very complex forms in version 6 that we do not have time to re-do in version 7. Do we know if there is a plan to fix this issue for PHP 8?
teldrive 12 Dec, 2021
Me too, will be very much apreciated an update CF6 and CC6 for Joomla 4
Colnem 13 Dec, 2021
Me too Me too!!!
We have to do a petition!

Colnem
Colnem 31 Dec, 2021
Hi Guys
Another fix bug

With PHP8, CF7, Backup doesn't work.
preg_replace() expects at least 3 arguments, 2 given
JROOT\administrator\components\com_chronoforms7\chronoforms\controllers\connections.php:628


Soluce:
Replace lines 628/629 by:
if(preg_match('/Opera(\/| )([0-9].[0-9]{1,2})/', $_SERVER['HTTP_USER_AGENT'])){
$UserBrowser = 'Opera';
Replace lines 630/631 by:
}elseif(preg_match('/MSIE ([0-9].[0-9]{1,2})/', $_SERVER['HTTP_USER_AGENT'])){
$UserBrowser = 'IE';
Happy Good Year
gmarra7 18 Jan, 2022
Good morning after following what is suggested in this post which other changes have been added for errors of the type related to chronoengine_gcore2 plugin:
- Call to Undefined method Joomla \ CMS \ Application \ AdministratorApplication :: isAdmin ()
- Factory :: getUri

Now I find myself with this error for which I believe it is not possible to recall neither the css nor the js files (error 403) for Chronoforms:

Refused to apply style from '<URL>' because its MIME type ('text / html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Thanks to all those who want to help me
Colnem 18 Jan, 2022
Hi

- Call to Undefined method Joomla \ CMS \ Application \ AdministratorApplication :: isAdmin ()
You have to replace all occurence of "::isAdmin" by "::isClient('administrator')" in this files:
1) librairies\cegcore2\admin\extensions\chronofc\conditions\site\site_process.php (1 occurence)
2) plugins\system\chronoengine_gcore2\chronoengine_gcore2.php (3 occurences)

- Factory :: getUri
Idon't know at this time

Salute from France
gmarra7 18 Jan, 2022
Hi Colnem, thank you for your reply.
I had already solved these errors.

What I can't solve is the following: The resource from "https://nomedominio.it/libraries/cegcore2/assets/js/g2.js" has been blocked due to mismatch ("text / html" ) of the MIME type (X-Content-Type-Options: nosniff).

I await an answer thanks
Colnem 18 Jan, 2022
To morrow I'll search about this...
Curious "text / html"... Why not "text/html" ?
Colnem 19 Jan, 2022
Hi

- Factory :: getUri

For this bug, I've replaced \JFactory::getURI by \JURI::getInstance() in libraries\cegcore2\libs\joomla\boot.php and libraries\cegcore2\libs\joomla\extension.php
The same for you?

Thanks

Edit:
After fixing some bugs, I can install CF6 and CV6 with J4+PHP8.
I can restore a backup. But I can't create a new Form.

I think there are many method deprecated...
gmarra7 19 Jan, 2022
1 Likes
Hi I confirm the fixes that are starting to get too many and time is a scarce resource. The developer "latita" and we do not know if the V6 will be made compatible with JOOMLA4 + PHP8. All this added to the lack of possibility to migrate form from v6 to v7 leads me to change extension.

At the moment, after many interventions, the situation is this:
- I can't create forms
- The component both in front and in admin no longer calls neither CSS nor JS.

Colnem 19 Jan, 2022
The same for me, now

I could restore a CC6 backup from J3+PHP7.4 and run with J4+PHP8
Just at this time, I can't open a New or a Demo Connection...
I search, I search...

I think thant the developer doesn't migrate CC6 or CF6 because CF7 replace this 2 extensions...
But at this time, CF7 is not really finished!
dsimonse 30 Oct, 2022
Hi,
Since the most urgent matter is PHP8 (J3 lasts for almost a year still) I would appreciate CF6 and CC6 to be compatable with PHP8.
To be able to migrate at a more controlled pace to J4 and CF7.
//Dennis
Colnem 30 Oct, 2022
Don't dream!
Max_admin 10 Dec, 2022
1 Likes
I have an almost complete CF v6 installer for J4 and PHP8, but this needs to be tested under different scenarios, please send me through the contact page to get the installer and test it with your forms on your J4 website.

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
You need to login to be able to post a reply.