Upgrading from 3.2.9 to 4.0.5

Please report bugs here!

Moderator: Thorsten

Post Reply
Arametheus
Posts: 15
Joined: Wed Sep 11, 2024 8:47 pm

Upgrading from 3.2.9 to 4.0.5

Post by Arametheus »

I know this is a major upgrade.

I've had nothing but issues.

I use Nginx and php 8.2 right now.

1. .htaccess is required by phpmyfaq but isn't used by the server since nginx doesn't use it.
2. I finally have the update page loading but I can not click next update step.

only message on the screen is.
Please create a full backup of your database, your templates, attachments and uploaded images before running this update.

then the 3 dots are red. I would add a screen shot but looks like a limit was hit.


I don't know what to do next since I don't have any errors.

if I hit the index page right now I get template error which guessing will go away once the upgrade is done since I'm just using default.
phpMyFAQ Fatal error
Uncaught exception: 'TypeError'

Message: 'phpMyFAQ\Template\TwigWrapper::setTemplateSetName(): Argument #1 ($tplSetName) must be of type string, null given, called in /var/www/phpmyfaq/admin/index.php on line 105'

Stack trace:

#0 /var/www/phpmyfaq/admin/index.php(105): phpMyFAQ\Template\TwigWrapper::setTemplateSetName(NULL)
#1 {main}
Thrown in '/var/www/phpmyfaq/src/phpMyFAQ/Template/TwigWrapper.php' on line 123
Arametheus
Posts: 15
Joined: Wed Sep 11, 2024 8:47 pm

Re: Upgrading from 3.2.9 to 4.0.5

Post by Arametheus »

While waiting for your reply on this. I did a new install.

ran setup. typed in all the information pointing it to a new DB.

and I get this error now kb2.optimize-digitalmarketing.net redirected you too many times.
Try deleting your cookies.
ERR_TOO_MANY_REDIRECTS

https://kb2.optimize-digitalmarketing.n ... tup/setup/
Virgile
Posts: 53
Joined: Thu Jul 25, 2024 7:33 am

Re: Upgrading from 3.2.9 to 4.0.5

Post by Virgile »

Hello,

I had a similar problem and what solved my problem is :

enable headers and rewrite mods :
a2enmod headers
systemctl restart apache2
a2enmod rewrite
systemctl restart apache2

modify the RewriteBase in the .htaccess file, which was incorrect ( RewriteBase / => RewriteBase /phpmyfaq/ )

I'll leave it up to you to adapt to your Nginx and if not, you can have a look at my topic on this subject: viewtopic.php?f=3&t=43509
Arametheus
Posts: 15
Joined: Wed Sep 11, 2024 8:47 pm

Re: Upgrading from 3.2.9 to 4.0.5

Post by Arametheus »

Virgile,
Thanks I got it finally to install on a new instance, I ended up modifing a bunch of nginx configs.

I then copied all my faq's over to the new DB.

The issue I have now though. in the admin I see the FAQ content fine when you edit it, but then when I go to view it in the front side I see the title but no content.

am I missing something in the new settings to all the FAQ to render.. theres no error.

I would attach images but the board quota is at the limit.
Thorsten
Posts: 15682
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Upgrading from 3.2.9 to 4.0.5

Post by Thorsten »

Hi,

the first bug was fixed today: https://github.com/thorsten/phpMyFAQ/co ... 88bc04eb4c

Yes, if you use nginx, you don't need to care about the .htaccess file. I'll add a better error message.

Is it possible that you enabled Markdown support? Or do you use Markdown?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Arametheus
Posts: 15
Joined: Wed Sep 11, 2024 8:47 pm

Re: Upgrading from 3.2.9 to 4.0.5

Post by Arametheus »

@Thorsten. Thank you must have got checked when i was going thru the new settings.

now to just retest everything make sure I don't have any other issues.
Arametheus
Posts: 15
Joined: Wed Sep 11, 2024 8:47 pm

Re: Upgrading from 3.2.9 to 4.0.5

Post by Arametheus »

when creating or editing a FAQ.

I get these errors in the console.

The first and second error looks like its coming from WYSIWYG editor guessing tinymce. I just downloaded the zip file from the download stable.
Failed to load resource: the server responded with a status of 404. => /assets/dist/plugins/help/js/i18n/keynav/en.js

index.php:1 Uncaught (in promise) Script at URL "/assets/dist/plugins/help/js/i18n/keynav/en.js"


This one api/faq doesn't exist on the server. so is this suppose to be a redirect in the nginx conf?
after testing its redirecting correctly to rewrite admin/api/(.*) /admin/api/index.php last; but then giving a 500

Failed to load resource: the server responded with a status of 500 (). => failed to load /admin/api/faq/update:1

SyntaxError: Unexpected token 'A', "An error o"... is not valid JSON
(anonymous) @ backend.js?1739190026:2

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'success')
at HTMLButtonElement.<anonymous> (backend.js?1739190026:2:2066568)


my guess is I'm missing something the routes in nginx. but I copied yours on github.
Last edited by Arametheus on Tue Feb 11, 2025 1:46 pm, edited 2 times in total.
Thorsten
Posts: 15682
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Upgrading from 3.2.9 to 4.0.5

Post by Thorsten »

Hi,

yes, we have an open issue on GitHub with nginx, I'll build a test Docker container to fix that.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15682
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Upgrading from 3.2.9 to 4.0.5

Post by Thorsten »

Hi,
Arametheus wrote: Mon Feb 10, 2025 1:27 pm This one api/faq doesn't exist on the server. so is this suppose to be a redirect in the nginx conf?
after testing its redirecting correctly to rewrite admin/api/(.*) /admin/api/index.php last; but then giving a 500

Failed to load resource: the server responded with a status of 500 (). => failed to load /admin/api/faq/update:1

SyntaxError: Unexpected token 'A', "An error o"... is not valid JSON
(anonymous) @ backend.js?1739190026:2

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'success')
at HTMLButtonElement.<anonymous> (backend.js?1739190026:2:2066568)
if you enable the DEBUG mode, you should see the error in the server response.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply