Page 1 of 1

Problem with images

Posted: Wed Apr 24, 2024 10:29 pm
by winddrifter
I maintain a mirror of my online blog on my local PC. I have a recent blog entry where the images will show on my local computer, but not on the hosted version. Both are using the latest version (1.3.dev [master]). Php 8.1.17 at home, 8.0.29 on the hosted (problem post) version. The images were showing up on the hosted version, but then something changed. I see links to the images, and they show the correct path.
-Permissions are the same for every folder/image in the images folder: 0776
-None of my other posts have a problem with images
-I deleted the images for this post and recopied them, along with the post entry text, from my home (working) version
-If, on the hosted version, I change an image property (such as width=xxx), the thumbnail image is regenerated in the .thumbnail sub-folder, so the image url is correct and the image is present.
-if I click on the image link I get a message "Image could not be loaded" at the top left corner I see something like 5/18, where it is the 5th image out of 18 in that image sub-folder. So the number of images is known, and which of the images it is.
-when I try to open link in new tab, I get a browser message saying I do not have permission to access that document.
FPImageProblem.png
FPImageProblem.png (74.96 KiB) Viewed 37018 times

Re: Problem with images

Posted: Thu Apr 25, 2024 6:11 pm
by fraenkiman
Hello @winddrifter,

welcome to the FLatPress support forum.
There are several possible causes of the error:
- The owner is not www-data
- The "Blogbase URL" is not correct (admin area, "Configuration" menu)

- Tests have shown that file permissions should have octal 0666 and directory permissions octal 0777

- It can't hurt to recreate the index in the admin area in the "Maintain" menu and then empty the theme and template cache.
- Please also clear the browser cache
- Deactivate subsequently installed browser extensions
- Check whether the problem also exists with another browser.

I recommend that you update FlatPress to 1.3 release or to 1.3.1 dev [master] for local testing.

Please report whether these measures have been successful.

With best regards
Frank

Re: Problem with images

Posted: Thu Apr 25, 2024 7:12 pm
by eagleman
Probably you had my same problem.
Try to put the inages folder into fp-content.
In this way you can use the same syntax when you write the link or you can use the dropdown menu into the editor.

Re: Problem with images

Posted: Fri Apr 26, 2024 1:37 am
by winddrifter
fraenkiman wrote: Thu Apr 25, 2024 6:11 pm - Tests have shown that file permissions should have octal 0666 and directory permissions octal 0777
- It can't hurt to recreate the index in the admin area in the "Maintain" menu and then empty the theme and template cache.
Please report whether these measures have been successful.
With best regards
Frank
That was very useful! I had tried the 'restore file permissions' and rebuild index under Maintain, but without joy. The file permissions gave me an error about not being able to reset to 0776, but I ignored it because all of the files/folders were 0776. Now that I've used the permissions you gave, everything is working.

My home install is Windows, so those file permissions are not a problem, but now I know what they should be.

Thanks!

Richard