Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
87 views
in Q2A Core by

Answering a question, and can no longer upload images, after upgrading to Version 1.8.6

When I select Image icon in answer banner:

Q2A works as expected and takes me to the Image upload dialog:

I then select the 'Upload' tab in the upper banner, and Q2A successfully updates the dialog, and I next select 'Choose File', i.e:

After navigating to the jpeg image I wish to upload and selecting it, and next selecting 'Open', i.e.:

Q2A then takes me back to the 'Image Properties' dialog, and I next select 'Send it to the Server', i.e.:

This is where Q2A fails, as compared to what it used to do. The dialog  changes back to the 'Image Info' banner tab (as expected) but the lower 'Preview' view does not show the image, it eventually displays a big red X, and the details of the image (Width, Height, Border,...) are all blank, i.e.:

Any pointers on how to debug what is wrong would be greatly appreciated.

Q2A version: 1.8.6
ago by
1. You are missing the Headers one. You've linked the Initiator tab again.

2. I mean, in qa-config.php, do you see this:

define('QA_BLOBS_DIRECTORY', '/path/to/writable_blobs_directory/');

Or have you actually uncommented that code and set an actual value to that constant?

Note this defines if your blogs are saved to disk or to the database.
ago by
Sorry about the image url for the Headers, try this one:

https://drive.google.com/file/d/1QzgyiSZ8PeVZmNx5lBZxPT4bEBmu1v7j/view?usp=sharing

And the parameter QA_BLOBS_DIRECTORY is still the default, like what you have above, and is commented out.
ago by
Interesting. I wanted to see the status code and it is not there. If you click on the "X" next to the Headers tab you will see the list of columns. I'm sure there is one for Status.

1. What is that status?

I get the impression something is blocking those requests.

2. Also, can you share the Headers and Response tabs of the POST request immediately before the one you have selected in the image? (the one that starts with index.php?wysiw...). For the response, please, just remove the domain as precisely as you can, I'd like to see every other character.

3. Make sure you have properly configured your site URL in admin/general. For example, for this site, it would be: https://www.question2answer.org/qa (note it should be HTTPS, rather than HTTP)

4. Can you replicate this issue with different URL structures in admin/general?

5. a. What image type are you uploading? I can confirm the image in your last post is a JPG image created with GIMP.
b. Do you get the same error when trying to upload THAT image?

6. Is there any reason why you are not using HTTPS?

7. In php.ini are you logging ALL errors? error_reporting = E_ALL

8. a. Do you have the GD extension of PHP?
b. Is it compiled with JPEG support?
c. What is your PHP version?

9. Are you able to upload the "Default avatar" image in admin/users? If not, what is the error you're getting?

BTW, check the "Disable cache" checkbox in the last image.
ago by
Hello,

Thanks again for all your assistance.

Lots of information requested, I will do the best I can.

1. Status, below is the captured image, and yes it is a network timeout:

https://drive.google.com/file/d/1pZAsRQMCO3KcOE9GE3DRWj2l5nm1mvW_/view?usp=sharing

2. The Headers data was over 1 page in size so captured in two separate screen grabs:

WYSIWYG Header 1:
https://drive.google.com/file/d/1hEcFtn_Ir4mdtdLzw0tUWGkyH78rtWwN/view?usp=sharing

WYSIWYG Header 2:
https://drive.google.com/file/d/1fpzZvooHcieJHGoey1AO7P3Z6coHAkSU/view?usp=sharing

3. Changed to https from http for site URL in admin/general; then retested image upload.
Unfortunately no difference.

4. I presume you mean try the upload again after changing from http to https.
I did and no difference.

5. The image is jus a screen capture from GIMP, and I uploaded it to my 1.8.1 Q2A version instance at home no issue.

6. No reason, just using default out of the box Q2A install.

7. Yes, i.e.:
$ php --info | grep errordisplay_errors => STDERR => STDERR
display_startup_errors => On => On
error_append_string => no value => no value
error_log => syslog => syslog
error_prepend_string => no value => no value
error_reporting => 32767 => 32767
html_errors => Off => Off
ignore_repeated_errors => Off => Off
log_errors => On => On
log_errors_max_len => 0 => 0
track_errors => Off => Off
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
intl.error_level => 0 => 0
opcache.error_log => no value => no value

8a. I am not familiar with GD extension, so my guess is NO.
8b. Unsure
8c $ php -v
PHP 7.3.31-1~deb10u1 (cli) (built: Oct 24 2021 15:18:08) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.31, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.31-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies

9. Yes, uploaded my avatar (jpeg) as default image, no issues.

On the 'Disable cache', I presume you want me to select that before attempting any future debugging.

Thanks again,
-John

Please log in or register to answer this question.

...