✅ AJAX Error when installing extension

🆓 Fully integrated 🛒 Shop System for the “Advanced Points System”. Ease-of-use filesystem interface for item images and files. High customisation options and possibilities per item (included by default Points and Files).


Post Reply
User avatar
Gauvain_Boiche
Novice
Novice
Posts: 9
Joined: 05 Apr 2020 10:22

✅ AJAX Error when installing extension

Post by Gauvain_Boiche »

Greetings !

As requested, I’m here to report a bug occuring when installing Advanced Shop System :

Image

I don’t get any complete log on the board itself, and I still need to manage where to get in from my VPS running on Debian 9. If anyone had this issue and got a way to get rid of it, I’m all listening. If you have some Linux commands to retrieve any AJAX logs from my server, I can provide them too.

Here is my configuration :

Image

I’m running the French language on the board, “British Empire” still being activated.

Thanks in advance !

PortFolio

Please consider. In general. Thank you :)


User avatar
3Di
Founder
Founder
Posts: 1315
Joined: 12 Mar 2018 20:10
Location: Milan (IT) Frankfurt (DE)
Contact:

[BUG] [PHP 3.3.0] AJAX Error when installing extension

Post by 3Di »

Disable Javascript in your browser and try again to enable it.

Without Javascript the error will be visible.

P.s: We understand French although we prefer English to be the language spoken on the forums.

🏥 Honour and respect to all our heroes in health care. 🇮🇹
Looking for a specific solution for your site? We will rock you! 🚀


User avatar
Gauvain_Boiche
Novice
Novice
Posts: 9
Joined: 05 Apr 2020 10:22

[BUG] [PHP 3.3.0] AJAX Error when installing extension

Post by Gauvain_Boiche »

3Di wrote:
05 Apr 2020 23:17

P.s: We understand French although we prefer English to be the language spoken on the forums.

My board is in French, yet I haven’t spoke any word in French here since my coming, I don’t see why you are telling me this…

Anyway, I did disable JS : when installing, instead of a prompt, I was redirected to a new page for confirmation, which led to… a blank page.

With this link :
http://www.blabla.com/adm/index.php?act ... Z6J9S7DFU2

I tried to view the source code, and nothing was displayed. Just plain blank page :/

PortFolio

Please consider. In general. Thank you :)


User avatar
Goldy
Founder
Founder
Posts: 294
Joined: 12 Mar 2018 12:33
Location: The Netherlands
Contact:

[BUG] [3.3.0] AJAX Error when installing extension

Post by Goldy »

3Di meant, that we understand French. So screenshots showing in French are fine with us, as we can deduct what is what. Just general conversation on the forum we prefer to be in English. Just something for your convenience, so you do not have to translate screenshots and such.

A white page usually means some kind of server error. You’ll have to check your servers php error logs for a more concise error message. These are usually located in your public_html folder called error_log (without suffix). Alternatively they might be available in your cPanel.

Alternatively, what you could try, is keeping JS enabled and try enabling it again. However, this time with the developer tools open. If you’re on Windows, you can open your developer tools with Ctrl+F12. Then select the “Network” tab. Now that you’ve got it open, enable the extension and follow the regular process. Now when you get the ‘AJAX Error’ popup, in the Network tab you’ll see a red link. You can select that one and then copy paste the contents of the “Response” tab that will be available. Perhaps that will show a proper error message.


User avatar
Gauvain_Boiche
Novice
Novice
Posts: 9
Joined: 05 Apr 2020 10:22

[BUG] [3.3.0] AJAX Error when installing extension

Post by Gauvain_Boiche »

Hello !

So, I made some operations like you did, and tried to push it further… So, the debugging console did return a response in the end, not a red one, but a purple one… But… without any response.

As you can see :

Image

It plain white too.

I managed to go to my Nginx logs, and got this message ( multiple times ) :

VERY LONG MESSAGE WARNING !

2020/04/06 11:03:18 [error] 877#877: *2704 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Symfony\Component\Filesystem\Exception\IOException: Failed to create "./../images/aps": mkdir(): Permission denied. in /var/www/html/san-reymoros/vendor/symfony/filesystem/Filesystem.php:104
Stack trace:
#0 /var/www/html/san-reymoros/phpbb/filesystem/filesystem.php(336): Symfony\Component\Filesystem\Filesystem->mkdir(Array, 511)
#1 /var/www/html/san-reymoros/ext/phpbbstudio/ass/migrations/install_directories.php(62): phpbb\filesystem\filesystem->mkdir(Array)
#2 [internal function]: phpbbstudio\ass\migrations\install_directories->create_shop_directories(0)
#3 /var/www/html/san-reymoros/phpbb/db/migrator.php(714): call_user_func_array(Array, Array)
#4 /var/www/html/san-reymoros/phpbb/db/migrator.php(661): phpbb\db\migrator->run_step(Array, 0, false)
#5 /var/www/html/san-reymoros/phpbb/db/migrator.php(436): phpbb\db\migrator->process_data_step(Array, false)
#6 /var/www/html/san-reymoros/phpbb/db/migrator.php(288): phpbb\db\migrator->try_apply('\\phpbbstudio\\as...')
#7" while reading response header from upstream, client: 81.53.86.45, server: san-reymoros.fr, request: "GET /adm/index.php?i=acp_extensions&sid=282a80a3d2d534fd3b82a278668f8774&mode=main&action=enable&ext_name=phpbbstudio%2Fass&hash=1aaf8386 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "51.158.117.152", referrer: "http://51.158.117.152/adm/index.php?i=acp_extensions&sid=282a80a3d2d534fd3b82a278668f8774&mode=main&action=enable_pre&ext_name=phpbbstudio%2Fass"


…. too long and same error, truncated. by 3Di.


So I dag in the Filesystem.php file ( after trying to reinstall the extension while on chmod 777 on the folder /ext/ ) and here is what is displayed on line 104 :

Image

This looks like a permission error with the mkdir function. Yet, this is getting a hell of a problem to resolve :x

Does the extension needs special permissions on activation ?

Last edited by 3Di on 06 Apr 2020 16:59, edited 1 time in total.

PortFolio

Please consider. In general. Thank you :)


User avatar
Goldy
Founder
Founder
Posts: 294
Joined: 12 Mar 2018 12:33
Location: The Netherlands
Contact:

[BUG] [3.3.0] AJAX Error when installing extension

Post by Goldy »

A quick fix for you is to do the following:
Create two new aps directories, one inside the images directory and one inside the files directory.
<root_path>/files/aps and <root_path>/images/aps

Then in the migrations folder of the Advanced Shop System extension, comment out a single line.
File <root_path>/ext/phpbbstudio/ass/migrations/install_directories.php:
Line 39: Github link
Comment out: // ['custom', [[$this, 'create_shop_directories']]],

Then try installing the extension again.

I’ve made an issue in our private repository, to add additional checks to the filesystem migration.


User avatar
3Di
Founder
Founder
Posts: 1315
Joined: 12 Mar 2018 20:10
Location: Milan (IT) Frankfurt (DE)
Contact:

[BUG] [3.3.0] AJAX Error when installing extension

Post by 3Di »

Try this amended migration and see pls.

Replace the file

ROOT/ext/phpbbstudio/ass/migrations/install_directories.php


install_directories.zip
(765 Bytes) Downloaded 7 times

🏥 Honour and respect to all our heroes in health care. 🇮🇹
Looking for a specific solution for your site? We will rock you! 🚀


User avatar
Goldy
Founder
Founder
Posts: 294
Joined: 12 Mar 2018 12:33
Location: The Netherlands
Contact:

[BUG] [3.3.0] AJAX Error when installing extension

Post by Goldy »

Problem with that migration, 3Di, is that we still need the folders to be created. So we might have to explore some other options aswell.
On my phone so cant fully check the zip, but just checking if we can make a folder and otherwise don’t make it, might not be a complete solution.
Thinking out loud here


User avatar
3Di
Founder
Founder
Posts: 1315
Joined: 12 Mar 2018 20:10
Location: Milan (IT) Frankfurt (DE)
Contact:

[BUG] [3.3.0] AJAX Error when installing extension

Post by 3Di »

Is more a test I want to conduct here, I already know where the issue is over there IMO.
I am not avoiding the creation of the folders at all, just forcing the CHMOD.

Failing this I’ve got another idea.

🏥 Honour and respect to all our heroes in health care. 🇮🇹
Looking for a specific solution for your site? We will rock you! 🚀


User avatar
3Di
Founder
Founder
Posts: 1315
Joined: 12 Mar 2018 20:10
Location: Milan (IT) Frankfurt (DE)
Contact:

✅ AJAX Error when installing extension

Post by 3Di »

This is fixed and will be a part of the next release, tested by beta testers too. ;)

🏥 Honour and respect to all our heroes in health care. 🇮🇹
Looking for a specific solution for your site? We will rock you! 🚀


Post Reply