-
-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: No longer managing image files automatically and local files being linked on deployed sites #1621
Comments
I am totally unable to reproduce this issue - I have tried:
In all cases in database I have Maybe you are uploading preview files? Because I have no other idea how it is possible to achieve such paths on the server. |
I think I have the same thing since I am using publii in January 2024 |
I've tried all combinations of image sources - I have verified that I am adding it from valid sources (not preview). I tried a few more things - this seems to only be happening to one of my sites (for now) - I've tried everything up to clean install with restoration from backup. Happy to debug this further if you can point me in the right direction. Current workflow - the site has 1 published page, which has been marked as the homepage. Everything works as expected when previewing, but when deployed, the link is still pointing to my local filesystem. An additional, reproducible bug is that once I create and deploy a page, going back to it breaks the content even locally because the system is checking for media files under "$USER-Publii-path/site-name/input/media/pages/page-number/file", but there is no such directory created on mine - everything is still under .../posts/... - so this is reproducibly breaking for me. |
@abhishekchoudhary - I have found a reason of the issue with invalid paths in editor, it will be fixed tonight in hot fix. Regarding your main issue - I still have no idea what causes it as I cannot reproduce this problem :/ |
@abhishekchoudhary - could you check in the website database if the problematic file has full local path in page content or do you have |
The problematic file has the full local path. In the text dump below, I've manually modified post 1 to include relative path of the file. The image in post 2 somehow has the same problem, but post 3 is fine. Post 4 has the same issue. Post 5 is fine for the first image, but has an issue with the second image. This is one weird bug.
|
@abhishekchoudhary - I have found a reason of your issue in the meantime and it is fixed by my latest commit, because all these issues have the same root :) In short - this issue appears in some save/save&close configurations when our code replacing file path to #DOMAIN_NAME# shortcode fails hot fix release will be available tonight - @bobmitro will let you know :) Thank you for finding the second issue, because it was a good tip :) |
Thank you for such a fantastic turnaround. Big fan of Publii! Being stuck was fun because it helped me poke around a little bit, and I ended up creating a couple of plugins which I think can help the community. I'll open a separate issue to get those deployed soon! |
Hotfix 0.46.0 build 16904 released. |
I made a mistake in the previous message. The correct version is Hotfix 0.46.0, build 16908. Sorry about that. |
Thanks Bob. I've requested a change to the homebrew cask so the Might I suggest making homebrew ask update a part of your release cycle. :-) |
Seems to be fixed! |
Hi @dziudek - I've found another failure case. When I copy/paste image files between pages (WYSIWYG editor), I still get local links to deployed sites. However, if I "create" the image element on the target page, it seems to work fine. I thought I'd reopen the same bug and let you folks know. |
Hi, I'm using Publii 0.46.1 and seem to have the same issue as reported. After adding an image via the WYSIWG editor, the URL in the WYSIWYG HTML viewer shows the full local path. I noticed it because I'm sharing the site development with someone else who has a different local path, so images don't work between us. Let me know if there's any further info that would be helpful. Or if it's an entirely separate bug and I should use a new issue! |
@Odaeus - do you have this issue do copy-paste of image or you have added the image in the different way? @abhishekchoudhary - this case is a bigger issue to solve, because when you copy-paste image it is not uploaded to the specific post images directory. Also paths from other posts are not converted properly. At this moment you should avoid it and I will try to find a solution for such case, but it won't be probably easy |
@dziudek I used the insert image toolbar button. What's the expected |
@Odaeus - in post editor you will always have an absolute path to make the image working. But during save it is modified to use |
@dziudek I can see it's stored correctly in the DB. I must have a different issue that caused broken images. I'll open an issue if I'm able to reproduce. |
Sounds like copy/pasting is not a new issue, and is not really related to the original bug I reported. I'll close it again. Thanks @dziudek - great work! |
Operating system
macOS Sonoma 14.5
Publii version
0.46.0
Post editor
WYSIWYG editor
Bug description
Adding an image to my page, everything works fine locally, but Publii is no longer "managing" my file, and is simply uploading the page with links to my local filesystem.
Steps to reproduce
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: