ryanvilbrandt / comic_git

A statically-hosted web comic server core intended to be hosted on github.io. For help getting started, click the Wiki link above!
23 stars 7 forks source link

Changes processed but the website refuses to update mostly? #76

Closed vsitante closed 5 months ago

vsitante commented 5 months ago

Hey! So first, thanks for making this kind of comic CMS! We need more out there! I super appreciate that the instructions were not only easy, but clearly written for dumb dumbs like me, haha.

Which is why it sucks to write the second point--which is that...my website just doesn't update changes?

So I followed the instructions up to the "Editing the Colors and Layout of the Website," and that's only because after pushing enough changes through Github desktop, I decided to take a look at my website and...nothing had been updated. The sample comic and layout were still in place. The only changes that stuck were the ones I did outside of the program and Github, e.g. changing the banner and deleting the comics and background. Not even the comic info.ini file appears to have changed. The test comic I uploaded appears nowhere, as the archive page still only shows the sample archive page.

I am at a loss as to what's happening, because all my deployments seem okay and I have no errors or actions to take care of listed anywhere on my own repository. Here's a link to said repository.

Any help is appreciated. Thank you!

ryanvilbrandt commented 5 months ago

Thanks for using comic_git! Glad you're enjoying it so far!

If you go into the Actions tab in your GitHub repo, you can see that the most recent Auto-build HTML files job has failed. This indicates something went wrong when trying to build your website, so it left the already-deployed website alone.

If you click into that, you can then click the build (3.8) link that has a red X next to it. That will take you to the build job logs, and you can see the "Run python build script" step is where the error happened (red X). That should auto-open for you, and it will show you the following error:

Traceback (most recent call last):
  File "src/scripts/build_site.py", line 604, in <module>
    main(parse_args())
  File "src/scripts/build_site.py", line 559, in main
    comic_data_dicts = build_and_publish_comic_pages(
  File "src/scripts/build_site.py", line 163, in build_and_publish_comic_pages
    process_comic_images(comic_info, comic_data_dicts)
  File "src/scripts/build_site.py", line 431, in process_comic_images
    process_comic_image(comic_info, comic_data["comic_path"])
  File "src/scripts/build_site.py", line 418, in process_comic_image
    with open(comic_page_path, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'your_content/comics/height/Page_197.png'

This error isn't entirely clear to new users, and I'll work on making it clearer in the future. But this usually means that you have a "Filename" value in one of your info.ini files that doesn't have a matching file.

Looking in your height comic folder, I can see you have your comic file named height1.png. If you update the "Filename" value in the info.ini file to match, your website should build properly.

ryanvilbrandt commented 5 months ago

In the future, if your website is not building properly, the Troubleshooting page on the wiki will provide useful suggestions for tracking down the issue yourself.

vsitante commented 5 months ago

Thanks for the reply! Let me reply per point, sorry for the possible long post--

In the future, if your website is not building properly, the Troubleshooting page on the wiki will provide useful suggestions for tracking down the issue yourself.

I did take a look at the Troubleshooting guide before I wrote this issue. In fact, it's how I figured out that I was initially pushing the changes to "working" instead of "master" XD Otherwise I wouldn't have written this up, since I did trawl through the entire wiki and saw nothing relevant to my current issue. I even considered trying "Hosting git_hub outside of Github Pages" as an alternative to fix my problems but the process was too complicated for me. ^^;

If you go into the Actions tab in your GitHub repo, you can see that the most recent Auto-build HTML files job has failed. This indicates something went wrong when trying to build your website, so it left the already-deployed website alone.

That's news to me, because I had checked the Actions at the time of writing the post and the Auto-build HTML had been processed as success. I'm guessing a delayed workflow must have been processed when I wasn't looking.

This error isn't entirely clear to new users, and I'll work on making it clearer in the future. But this usually means that you have a "Filename" value in one of your info.ini files that doesn't have a matching file.

Looking in your height comic folder, I can see you have your comic file named height1.png. If you update the "Filename" value in the info.ini file to match, your website should build properly.

So I went to check my info.ini and the filename is correct? Here's the info:

Title = Cursed with short energy
Post date = June 16, 2023
Filename = height1.png
Alt text = Black and white simple-looking comic. This has five panels. We start with the little girl and her mother in the first panel. Kumiko says Thank you for the drink, mami! (She looks happy) Astemar says You're welcome! (She looks pleased) Still looking pleased, Astemar says Kumiko tries so hard despite her size...Sure is a shame--that she has to stay small--Suddenly, ashes to ashes, dust to dust, and American sitcom-style, we see that Kumiko is now older and taller! Kumiko says Do you want a drink, mami? Kumiko looks happy and waiting, while Astemar considers her life choices in life, her pleased expression not changing.
Storyline = 

So again, not sure what's happening.

I did take a look at the folder and noticed this structure.

gitfolder

The archive page here is the one that's on the website, instead of the one I directed the git to use. archive folder

This is wrong, right? I don't know why there's suddenly two comic folders when there should only be one (which is the one in your_content and as you can tell, it's set up the way the tutorial says to do.)

your content folder

Is it possible this is the cause of the bugs?

ryanvilbrandt commented 5 months ago

First off, please let me applaud you for going through the Troubleshooting section before asking for help! 👏 This puts you in the extreme minority of help requests. On a related note, thank you so much for including your repository in the initial help request.

The folders archive, comic, infinite_scroll, etc are ones that are only created by the comic_git script itself and pushed to the master branch, so that they can be published onto GitHub Pages. When the comic_git build script runs, it pulls down all the files in the working branch, runs the build logic on that to create all the website's files, and pushes those files to the master branch wiping out any existing changes. As such, those folders should never appear on the working branch, which is the branch you should be uploading all your changes to.

Looking in your repository, I can see that the working branch doesn't have those folders, which suggests to me that you may have your master branch checked out on your local machine and be pushing your changes to that instead of working.

image

Looking in the commit history for your master branch, I can see there are a number of changes there that aren't in working, which supports my hypothesis.

image

Please doublecheck that you're uploading your changes to your working branch.

vsitante commented 5 months ago

I see! I can try pushing all the changes to the working branch instead later this weekend then, and tell you if the website is working properly then! \ o /

I will say though, like I said earlier, I had gone through the troubleshooting section, which is why I knew to make all the changes to the "master" branch instead. If we were supposed to make all the changes to the "working" branch instead, then is this section incorrect or have I misunderstood it?

image

ryanvilbrandt commented 5 months ago

Ah no, that section is correct. It however refers to this setting:

image

I'll update the text in that section to be a little clearer. And I'll add a troubleshooting step to doublecheck that you're pushing to the working branch.

vsitante commented 5 months ago

Ahhh okay! I misunderstood indeed, haha.

Also, sorry for replying late, time got away from me and I had some last night to test the site again. Weirdly enough, the edits I did to individual pages wouldn't take until I decided to use the "open the repository in an external editor" option that Github Desktop has--and then going through them to edit the CSS and comic info.ini, the actions processed! (You'll see two actions that didn't go through but that was me testing posting two comic pages in one post and seeing that it didn't work.) The folder structure also returned to its proper state, haha.

I tried just now to add another comic to the site and so far, so good, it's on there too!

I'll try to see as a next step if I can add more pages to the link bar and see if they actually appear, but so far, yes, seems like the website is finally working as intended! Thank you! And thank you for your patience ^^;

edit: well, I'll leave some hours pass and I'll check again, but I've been editing and adding new things and now, once again, the website isn't updating again...I'll leave a screenshot of what's been not processed:

image

--with the only thing being told in each action when I click on them is that there's some python deprecated build or something going on.

image

I'm seriously at a loss! X_X;;

ryanvilbrandt commented 5 months ago

In your last screenshot, If you click on the build (3.8) next to the red X, that will take you to the build logs. There, I can see the following error:

Traceback (most recent call last):
  File "src/scripts/build_site.py", line 604, in <module>
    main(parse_args())
  File "src/scripts/build_site.py", line 5[59](https://github.com/vsitante/heaven/actions/runs/9139524669/job/25131905441#step:7:60), in main
    comic_data_dicts = build_and_publish_comic_pages(
  File "src/scripts/build_site.py", line 209, in build_and_publish_comic_pages
    write_html_files(comic_folder, comic_info, comic_data_dicts, global_values)
  File "src/scripts/build_site.py", line 466, in write_html_files
    write_other_pages(comic_folder, comic_info, comic_data_dicts, global_values)
  File "src/scripts/build_site.py", line 492, in write_other_pages
    utils.write_to_template(page["template_name"], html_path, data_dict)
  File "/home/runner/work/heaven/heaven/src/scripts/utils.py", line 97, in write_to_template
    raise TemplateNotFound(f"Template matching '{template_name}' not found")
jinja2.exceptions.TemplateNotFound: Template matching 'substar' not found

This is an error indicating that you are asking comic_git to create an extra web page, but didn't provide an HTML file for comic_git to use for that page (note to self to make this error clearer).

First, are you intending to add an extra page to your website? That's what comic_git thinks you want, since you added substar = SubscribeStar under the Pages section, so it's looking for an HTML file named substar to use to build the page. If that's not what you intend and you just wanted to add a link to your SubscribeStar, you can delete that line from the Pages section and that error should go away.

If you do want to add a page to your website about SubscribeStar, you just need to go to your_content/themes/default/templates and add an HTML file named substar. You can read more about this process here: https://github.com/ryanvilbrandt/comic_git/wiki/extra-features#adding-new-pages

vsitante commented 5 months ago

Oh, okay! I keep forgetting you can click on the build itself xD

I was following the Links Bar section ("All other links will be treated as external links to other websites") and I figured there wouldn't be any issues with the Pages but re-reading the Pages section again in that editing page + your reply, I can now see why the error occurred XD Sorry!

I had already gone through the "adding new pages" feature on that link, because I made an about page following it (it's why there's an update that says "about, comic info" on my screenshot) but like I said above, I think I just misunderstood how direct links worked. I have been reading the entire wiki before making the mistakes I've done, don't worry ^ _ ^

Okay NOW, everything is working fine...I really don't want any more issues to pop up lol, so I do apologize for all the problems. Hopefully there shouldn't be anymore. Thank you!

ryanvilbrandt commented 5 months ago

Glad things are working out for you! I'm going to close this issue, but feel free to reach out if you have more problems.