We had an open question get created without a category. This caused the following error:
2023/08/15 20:32:00 [error] 712365#712365: *16176 FastCGI sent in stderr: "PHP message: phpMyFAQ TypeError: phpMyFAQ\Strings::htmlentities(): A
rgument #1 ($string) must be of type string, null given, called in /opt/bitnami/faq/admin/record.questions.php on line 98 in /opt/bitnami/faq/s
rc/phpMyFAQ/Strings.php on line 306
Temporary fix:
// Change the line between the <strong> tags.
<strong>
<?php if ($category->categoryName[$openQuestion->getCategoryId()]['name']) { ?>
<?=Strings::htmlentities($category->categoryName[$openQuestion->getCategoryId()]['name']) ?>
<?php } else { ?>
<?=Strings::htmlentities(" ") ?>
<?php } ?>
</strong>
Open question without category issue
Moderator: Thorsten
Re: Open question without category issue
Hi,
which version do you use?
bye
Thorsten
which version do you use?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Open question without category issue
At the time, we were on 3.1.16.
It looks like this error has gone away with 3.2.2 which we are now on.
It looks like this error has gone away with 3.2.2 which we are now on.
Re: Open question without category issue
Now on 3.2.2 our new Questions are not being saved.
The log shows that the category id is not set in the request.
I tried selecting another category before submitting the new question. Same issue. No category id in the post request.
Here's the log:
"POST /api.service.php?action=ask-question HTTP/1.1" 200 53 "https://<our site url is here>/index.php?action=ask&category_id=0"
The log shows that the category id is not set in the request.
I tried selecting another category before submitting the new question. Same issue. No category id in the post request.
Here's the log:
"POST /api.service.php?action=ask-question HTTP/1.1" 200 53 "https://<our site url is here>/index.php?action=ask&category_id=0"
Re: Open question without category issue
Hi,
that's fixed in the upcoming 3.2.3 release.
bye
Thorsten
that's fixed in the upcoming 3.2.3 release.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist