Category images not working right
-
I want to use category images with the Lavender theme.
After uploading each image, I can see the images in the category folder and each is named category-x for the forum number but the same image always shows for the two categories created so far.
I checked the url of each category and each have the correct links to the respective images yet the same image shows on both categories I've created.
I can change icons however which is weird.
Is there some sort of caching going on? I know there isn't any on the server and I don't think it's browser because it's happening across different browsers and from different networks.
What might be happening?
-
The background images are set in the template with a inline style https://github.com/NodeBB/nodebb-theme-lavender/blob/v6/templates/partials/category_child.tpl#L18, did you inspect in your browser? Are they pointing to the correct images? When you upload an image in the ACP for a category you still need to hit save to save the changes.
-
Hi,
I used manage, category, edit, Upload image on each category.
That didn't work so I actually renamed them from the command line to be sure. I renamed them as the category name which is unique.
I then set the URL to the image but the same image shows on two categories even though they have unique urls.If I use an icon on one category and an image on the other, then it works.
From the CLI, I can also see that the images are different sizes.Looking at the browser inspector shows the correct images/links but the page shows the same images.
-
@NodeHam said in Category images not working right:
I then set the URL to the image but the same image shows on two categories even though they have unique urls.
When this happens, and you inspect the background image, are they pointing to actually different URLs?
If that's the case, I don't see why that would cause the browser to load the same image, short of perhaps a caching issue.
-
Yes, it's confusing because I can see the different url's to the different images yet the same shows in both categories.
The browser sat overnight and was even restarted a few times since but the same images show so it's not browser cache at least.Too weird.
-
It's internal only but I'll see if I can get it opened for testing.
I now see that some browsers are seeing the different images but why some still aren't is beyond me.
This has to be a problem of caching somewhere and now unrelated to nodebb.I actually rarely suspect nodebb, it seems to be top notch code.