I have installed version 4.0.9 of phpmyfaq.
When I tried to register a QA using the create API, I got an error.
I got a typeerror message saying that the faqid must be of type INT.
Since I haven't specified the faqid as an API parameter, I feel like the data isn't being passed correctly during processing.
curl -X 'POST' \
'https://localhost/api/v3.0/faq/create' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"language": "de",
"category-id": 1,
"category-name": "Queen Songs",
"question": "Is this the world we created?",
"answer": "What did we do it for, is this the world we invaded, against the law, so it seems in the end, is this what we'\''re all living for today",
"keywords": "phpMyFAQ, FAQ, Foo, Bar",
"author": "Freddie Mercury",
"email": "freddie.mercury@example.org",
"is-active": "true",
"is-sticky": "false"
}'
4.0.9 api create error
Moderator: Thorsten
Re: 4.0.9 api create error
Hi,
did you add the PMF API Token in the header?
bye
Thorsten
did you add the PMF API Token in the header?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: 4.0.9 api create error
Hi,
I found the issue, it'll be fixed with 4.0.10
bye
Thorsten
I found the issue, it'll be fixed with 4.0.10
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: 4.0.9 api create error
Thank you as always.
I tried replacing the FaqController.php that was revised in version 4.0.10 in a 4.0.9 environment.
Executing the API CREATE was successful.
However, the registered FAQ could not be accessed via API GET.
I logged in as an administrator and confirmed that the FAQ was registered in Record Management on the Content Management screen.
I selected Publish on this screen and saved it, and then I was able to access it via API GET.
Is this working as intended?
I was hoping that I would be able to publish the FAQ with API CREATE.
Perhaps reinstalling 4.0.10 will result in the expected behavior?
I tried replacing the FaqController.php that was revised in version 4.0.10 in a 4.0.9 environment.
Executing the API CREATE was successful.
However, the registered FAQ could not be accessed via API GET.
I logged in as an administrator and confirmed that the FAQ was registered in Record Management on the Content Management screen.
I selected Publish on this screen and saved it, and then I was able to access it via API GET.
Is this working as intended?
I was hoping that I would be able to publish the FAQ with API CREATE.
Perhaps reinstalling 4.0.10 will result in the expected behavior?
Re: 4.0.9 api create error
Hi,
did you enable the auto activition in the admin configuration?
bye
Thorsten
did you enable the auto activition in the admin configuration?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: 4.0.9 api create error
Thanks for your reply.
Where can I find the automatic activation settings?
If there is a settings manual, I will refer to it, so please let me know where it is.
I logged in as an administrator and looked through the preferences screen, but I couldn't find the relevant setting.
Where can I find the automatic activation settings?
If there is a settings manual, I will refer to it, so please let me know where it is.
I logged in as an administrator and looked through the preferences screen, but I couldn't find the relevant setting.
Re: 4.0.9 api create error
Hi,
it's in the admin section under Configuration -> FAQs -> Automatically activate new records:
bye
Thorsten
it's in the admin section under Configuration -> FAQs -> Automatically activate new records:
bye
Thorsten
You do not have the required permissions to view the files attached to this post.
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: 4.0.9 api create error
Thank you. So it was a setting item here. I overlooked it.
I have already enabled it.
However, the FAQ records I registered automatically using the API create function were not published.
I have already enabled it.
However, the FAQ records I registered automatically using the API create function were not published.
Re: 4.0.9 api create error
Hi,
I'll check the issue!
bye
Thorsten
I'll check the issue!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist