Monday, 06 March 2023
  7 Replies
  445 Visits
0
Votes
Undo
Hi,
When you try to configure Jevents with PHP 8.0 and Joomla 3.10.11 and Jevents 3.6.48
You obtain an error of compatibility with PHP 8
Sorry, i don't note this error. But you can easily repeat this one PHP 8.0 and Joomla 3.10.11 and Jevents 3.6.48, and trying to click on "Configure Jevents" Button (to the top right)
With PHP 7.4 this error disappear.
CanadianJevents54 set the post as Critical priority — 1 year ago
CanadianJevents54 set the type of the post as  Bug — 1 year ago
0
Votes
Undo
Here is the error message :
"htmlspecialchars(): Argument #1 ($string) must be of type string, array given"
1 year ago
·
#230078
0
Votes
Undo
Can you enable Joomla debug mode and try again - it would give the line number of file where the error arises

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

0
Votes
Undo
Hello Geraint,
Thank you for taking care of this problem.
Sorry for not having done it before. But it is a site in production (several GB of data)
I will install a test version to give you the debug mode info.
Do you think it could come from an extension of Jevents?
0
Votes
Undo
It seems to be the field plugin (i will renew my account as soon as possible)

Here is the message with debug mode :
htmlspecialchars(): Argument #1 ($string) must be of type string, array given
/home/nfrqepxx/.../2023test/layouts/joomla/form/field/text.php:82

And here the code of the file

78 <input type="text" name="<?php
79 echo $name; ?>" id="<?php
80 echo $id; ?>" <?php
81 echo $dirname; ?> value="<?php
82 echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); ?>" <?php echo implode(' ', $attributes); ?> />
83 <?php if ($options) : ?>
84 <datalist id="<?php echo $id; ?>_datalist">
85 <?php foreach ($options as $option) : ?>
86 <?php if (!$option->value) : ?>
87 <?php continue; ?>
88 <?php endif; ?>
89 <option value="<?php echo $option->value; ?>"><?php echo $option->text; ?></option>
90 <?php endforeach; ?>
91 </datalist>
92 <?php endif; ?>
0
Votes
Undo
Hi,
I changed the code to fixe this problem, like that :
I copied some code before and after my changes .... So it will be more easy for other users to apply my fix...


<input type="text" name="<?php
echo $name; ?>" id="<?php
echo $id; ?>" <?php
echo $dirname; ?> value="
<?php
if (is_array($value))
{
$expanded = print_r($value, true);
echo $key . ' *** ' . $expanded;
}
else
{
echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8');
}
?>
" <?php echo implode(' ', $attributes); ?> />
<?php if ($options) : ?>
<datalist id="<?php echo $id; ?>_datalist">
1 year ago
·
#230136
0
Votes
Undo
If you use $name instead of $key in that code it would allow you to isolate which field is causing the problem

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

0
Votes
Undo
Thank you for your advice.
My fix avoid this problem.
Go beyond in order to find the field guilty become to complicated for me.
I will migrate my site on J4 And i will see if this problem occurs with J4.
I will keep you informed and possibly I will ask you for help when I have renewed my registration.
  • Page :
  • 1
There are no replies made for this post yet.

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.