Closed internetfreak closed 6 years ago
This is a known issue that has been back burner-ed. There is a disconnect with the date short when its used multiple times on the page.
Solution 1
If the images are removed from partials/sidebar.html
it should solve the problem.
Solution 2
Until its fixed, you could physically set the path as the date name scheme (I know this isn't ideal, but a temporary fix.)
Debuging Process
If you are interested, experiment deleting different parts of the various page templates (ex. Deleting parts of the contact template) untill it works properly. Then report back here with the line/segment of code. That will help me track it down easier.
I'd try to help tracking it down but I don't understand the process completely. Do I understand correctly that I should delete some parts of various template files until the short works correctly on every page or should I delete the generated page and recreate it?
So I would create a new directory (so you don't mess with your site), go to the page where the error occurs, then find that template, and delete pieces till it works. For example, for the contact page you would go to contact\list.html
and then just delete parts and see if it works. I generally start from the bottom, so I'd delete {{ partial "footer" . }}
.
I did as you told me so I went on and modified the template for the about page since I modified my site and then the original place worked again. After I deleted the footer partial from the template it worked. I think this is somehow related to a quirk regarding hugo since it builds multiple pages in parallel if I remember it correctly. Maybe the error occurs if two pages are built in parallel and the shortcode uses scratch data from the other site? Regarding my site I will remove the picture from the sidebar as I have more content on my sidebar which I want to show without having the user to scroll too much. I'm still available for helping on this issue. The contact page also seems to have a small bug but I'm not sure what exactly happens there so I cannot create an issue for that right now. I only know that there's some kind of sidebar on the right side which hides really fast (probably the mobile menu)
I think this is somehow related to a quirk regarding hugo since it builds multiple pages in parallel if I remember it correctly. Maybe the error occurs if two pages are built in parallel and the shortcode uses scratch data from the other site?
I did not know that was a quirk... that is good to know. I might know of a way to circumvent this because I believe you are right that this was the problem when I fixed the home page.
I only know that there's some kind of sidebar on the right side which hides really fast (probably the mobile menu)
I need to revisit the site breakpoints, I think that's where this issue comes from. Are you saying that it opens up on your contact page when you open it? I can't recreate that.
Just to clarify it: Hugo building the page in parallel is not the quirk I meant, that's useful as it speeds up build time. But I don't know exactly how the Scratch behaves when being used on multiple pages so that's why I mentioned it. I wish you luck that you can find the issue.
For the contact page: I just revisited the page and somehow only the contact page seems to load the css with a small delay as the page is visible without styling for some ms, then is displays the style and the right sidebar disappears. I created a gif showing the behavior a few times. Here you can see it: https://giphy.com/gifs/xUOxf7RvVhVf7xXyso The weird thing is that only the contact page shows this issue, no other page is affected and I visited all pages a lot since I was working on the page very actively.
Thank you for that gif, I will look into both of these once I have time. I'll see if I can recreate it on Firefox.
So I have gotten to some testing, and I do think it must be a Hugo quirk over a theme quirk. I am able to get the banner images to reappear when removing various aspects of the templates, but I have also noticed that I can get them to load by reloading the page a couple times, or starting and stopping the server. I am going to try messing with the Scratch
variables. I had fixed it on the banners not loading on the homepage. I will go back and see if I can see what I did.
I did get the menu to happen though. That being said, I think I am going to just redo it so that it truly is a mobile menu. Right now it is two separate menus (because that was the original design).
If you wouldn't mind testing the PR to confirm it works for you, that would be amazing.
Sorry that I couldn't react until now as there were some unplanned events. I already modified the template to fit my needs but I have a protected test version of my blog so I sure can pull the commit and test it. Give me a few days then I should have a result.
No problem! I have been super busy as well.
Expected Behavior
When publishing a post with a featured image using "date" as path, the image should be always shown wherever the post is displayed.
Current Behavior
On some (sub)pages, sometimes the image(s) are not shown. It's either only the "latest posts" section or the post itself or both.
Possible Solution
Currently I've got no idea how that issue exactly happens so I can not provide any suggestion
Steps to Reproduce or Template with Error (for bugs)
For an example look at this page: https://new.internetfreak.net You see that the site displays a feature image for the post. Now check here: https://new.internetfreak.net/about/ You'll see that the image disappeared from the sidebar. Checking the generated html source reveals the following image link: /date2017/11/launch.jpg
Context
This kind of issue looks weird and inconsistent as the image is sometimes visible and sometimes not visible
Your Environment
Hugo Version: 0.30.2
Browser: Firefox 56.0.2 64bit
Desktop or Mobile: Shouldn't matter but as I'm still developing I mostly experience it on desktop
Link to your project: see above for links
Note: I'm using a partially edited version of the template due to the hardcoded strings which I translated into german. I also added some taxonomy features (tags). For all modifications I copied the html file from the template into the layout folder of my site and then I started modding it so the original theme is left untouched as much as possible.