Field with php code doesn't working after update 6.0.9

Missimi 06 Mar, 2019
Hi all,

I've installed ChronoConnectivity 6.0.9 and i found a bug.
I use a "Fields" object with many fields written from a table. One "Custom" field shows a photo getting by this php code:

<?php
$nonce = "/images/work/Badge/Badge.jpg";
$filename = "/images/work/Badge/".$this->get("leggi_profilo.Pensionato.matricola").".jpg";
if (file_exists("/membri/patmix".$filename)) {
echo(" <img src=\"".$filename."\" WIDTH=\"144\" HEIGHT=\"196\" ALIGN=\"Middle\">");
} else {
echo (" <img src=\"".$nonce."\" WIDTH=\"144\" HEIGHT=\"196\" ALIGN=\"Middle\">");
}
?>

After 6.0.9 update, the field doesn't show the photo, but the following text:

("leggi_profilo.Pensionato.matricola").".jpg"; if (file_exists("/membri/patmix".$filename)) { echo(" "); } else { echo (" "); } ?>

I found that there is no "Fields" Widget as before listed in the menu under Forms.
I went to \libraries\cegcore2\admin\extensions\chronofc\views\fields open up fields.ini and i set "disabled" to "0".
The menu "Fields" reappeared but the mistake continue.
Have you any suggestion?

Best regards.

Patrizio
Max_admin 07 Mar, 2019
Hi Patrizio,

Are you able to attach a connection backup or send it by email ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Missimi 08 Mar, 2019
Hi Max,

for a simpler analisys, i made an update to "Basic article list" demo connectivity.
I added a custom field to "article_form_fields" with the following code:

<?php
echo (" Hello World");
?>

With ChronoConnectivity 6.0.7 (in environment Joomla 3.9.3) when i click the "Edit" buttom in any rows of the "articles_list", the article viewed showes "Hello World" at the end of the page.
With ChronoConnectivity 6.0.9 (in environment Joomla 3.9.3) the string didn't show.

I attach for you the backup of connection tested.

Best regards

Patrizio[file=11698]Basic_articles_list_08_Mar_2019_10_12_30.c6bak[/file]
healyhatman 08 Mar, 2019
Answer
1 Likes
It's there, it's just commented out.
<div class="field"><!--?php
echo ("Hello World");
?--></div>
If you need PHP there, use a PHP block and call it with {fn:phpblockname}
Max_admin 08 Mar, 2019
Exactly, the custom field does NOT support PHP
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Missimi 08 Mar, 2019
Hi all,

i understand ChronocConnectivity 6.0.9 custom field doesn't support PHP.
I tried follow the tip and the i wrote a PHP block called "Hello" with the code:
<?php
echo (" Hello World");
?>
In the custom fied i replaced the PHP code in the "Content" section with the "call {fn:Hello}" but when i try, i get: "syntax error, unexpected '<', expecting end of file".
Where do i wrong?
I attach following the new connection.

Best regards

Patrizio[file=11699]Basic_articles_list_08_Mar_2019_13_30_30.c6bak[/file]
"
healyhatman 08 Mar, 2019
Don't put the PHP tags in the PHP block, like it says not to.
Missimi 08 Mar, 2019
Now is ok!

Thank you

Best regards
This topic is locked and no more replies can be posted.