Skip to content
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

First link of sitemap index is invisible and empty #1442

Closed
valboivin opened this issue Mar 27, 2024 · 36 comments
Closed

First link of sitemap index is invisible and empty #1442

valboivin opened this issue Mar 27, 2024 · 36 comments
Labels

Comments

@valboivin
Copy link

Describe the bug

The sitemap index table indicates that there's one section, but the label and href are empty.
If I go directly to this section sitemap, I can see that it is well generated.

I've tried multiple times to regenerate the general sitemap with the same result.
Also, I've tested adding an additional individual URLs to the sitemap index. After this, I could see my original section sitemap link, but my additional URL was now in turn being invisible.

To reproduce

Steps to reproduce the behaviour:

  1. Generate the sitemap of the website
  2. Make sure that there's at least one section with sitemap urls generated
  3. The first line of the sitemap table will be unclickable (with the last updated date well visible)

Expected behaviour

The link to the section sitemap needs to visible and clickable.

Screenshots

screenshot 2024-03-27 at 8 52 07 AM

screenshot 2024-03-27 at 8 52 14 AM

screenshot 2024-03-27 at 9 04 06 AM

Versions

  • Plugin version: 4.0.45
  • Craft version: 4.8.2
@valboivin valboivin added the bug label Mar 27, 2024
@valboivin
Copy link
Author

Edit
I've overlooked at the sitemap with the 2 URLs. Seems like the invisible one is still the one for my pages section.
So it's not "the first" link that is problematic, but a specific one.

@valboivin
Copy link
Author

valboivin commented Mar 27, 2024

I've been able to make my link reappeared, but I don't feel like it's truly fixed.
I've got some more insights about this in case anyone has the same issue.

My problematic section is "Pages" and we have a couple of different entry types. Some of them have the "sitemap enabled" setting toggled on and some of them have it off.
I've enabled the sitemap for all entry types. My section link finally showed again in the sitemap index. Then, I've disabled once again the sitemap setting for the entry types we didn't want. It's just really odd. I've tried switching only one entry type and It didn't work. Seems like the only thing that worked was enabling all of them. And still, for some environments, as soon as one of my entry types is disabled, the link becomes invisible again.

@khalwat
Copy link
Collaborator

khalwat commented Mar 27, 2024

How do you have the sitemap enabled toggled on or off via in some of these sections? Is it via SEOmatic -> Plugin Settings -> Content SEO or is it via an SEO Settings field?

@valboivin
Copy link
Author

It is in SEOmatic -> Plugin Settings -> Content SEO, through the entry types dropdown.

screenshot 2024-03-27 at 1 04 20 PM

@khalwat
Copy link
Collaborator

khalwat commented Mar 27, 2024

So there actually should be a separate sitemap for each entry type. Have you checked to see if there are multiple sitemaps for this section, one for each entry type?

@valboivin
Copy link
Author

There's only one sitemap for the whole "Pages" section and not one for each entry type.
All URL from pages of different types are in the same sitemap.

@khalwat
Copy link
Collaborator

khalwat commented Mar 27, 2024

Can you please provide me with a live URL to your sitemap index?

@valboivin
Copy link
Author

valboivin commented Mar 27, 2024

This is the working one:
https://www.galleri.com/sitemaps-1-sitemap.xml

However, all the page links starting with /get-started are using a different entry type and they should not be there.
But, if I toggled off this entry type and some others, the sitemap bug reappears.
Overall, in the list generated for the Pages section, there are about 4 different entry types.

@valboivin
Copy link
Author

If you need a link with the broken sitemap, just let me know and I'll disable some entry types sitemap and invalidate our Cloudfront cache.

@khalwat
Copy link
Collaborator

khalwat commented Mar 28, 2024

I can take a look at it with you if you like; I feel like there may be something not quite right here.

Book a time for a video conference:

https://savvycal.com/nystudio107/chat

@valboivin
Copy link
Author

Perfect, I've booked a moment at beginning of next week. Thank you! 😄

khalwat added a commit that referenced this issue Apr 3, 2024
…tent SEO settings was a string, when it needed to be cast to an integer ([#1442](#1442)) ([#1368](#1368))
khalwat added a commit that referenced this issue Apr 3, 2024
…tent SEO settings was a string, when it needed to be cast to an integer ([#1442](#1442)) ([#1368](#1368))
khalwat added a commit that referenced this issue Apr 3, 2024
…tent SEO settings was a string, when it needed to be cast to an integer ([#1442](#1442)) ([#1368](#1368))
@khalwat
Copy link
Collaborator

khalwat commented Apr 3, 2024

Addressed in the above commits. You will need to re-save your Content SEO settings for each entry type.

Craft CMS 3:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop as 3.4.75”,

Then do a composer clear-cache && composer update

…..

Craft CMS 4:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop-v4 as 4.0.46”,

Then do a composer clear-cache && composer update

…..

Craft CMS 5:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop-v5 as 5.0.0-beta.9”,

Then do a composer clear-cache && composer update

@khalwat khalwat closed this as completed Apr 3, 2024
@valboivin
Copy link
Author

It's hard for me to test. I've changed the plugin version to the one mentioned and followed your instructions and I still have my invisible link. I thought that I could try to disable and re-enable one of my pages entry type config, but I can't even access the sitemap menu of my entry type. It triggers an error.

screenshot 2024-04-08 at 10 19 54 AM

@khalwat
Copy link
Collaborator

khalwat commented Apr 8, 2024

Sorry, fixed that just now, do these instructions again to update to the latest:

Craft CMS 3:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop as 3.4.75”,

Then do a composer clear-cache && composer update

…..

Craft CMS 4:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop-v4 as 4.0.46”,

Then do a composer clear-cache && composer update

…..

Craft CMS 5:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop-v5 as 5.0.0”,

Then do a composer clear-cache && composer update

@khalwat
Copy link
Collaborator

khalwat commented Apr 10, 2024

@valboivin
Copy link
Author

Sorry for the late reply, but it seems like my bug is still present. I've tried with Seomatic version 4.0.46 and also with the newest 4.0.48 version.

@khalwat
Copy link
Collaborator

khalwat commented Apr 19, 2024

Did you re-save the Content SEO settings for each entry type?

@valboivin
Copy link
Author

Yes I did. It worked on my local environment, but not on our QA environment. It's odd. I'm thinking that it might be related to one specific entry and not a type in general. I'm not sure though.

@jwrudzin
Copy link

I'm still seeing this issue as well, even after updating to v4.0.48 and re-saving the Content SEO settings for each entry type (and clearing all caches).

@khalwat
Copy link
Collaborator

khalwat commented Apr 22, 2024

@jwrudzin Are you working on the same project as @valboivin ?

@valboivin Did you update the Content SEO settings on your QA environment for all entry types, as well as on your local environment?

@valboivin
Copy link
Author

@khalwat, no we're not working on the same project. We don't even know each other.

And yes, I've updated the SEO settings for all entry types on my local environment, QA environment and even Staging environment.

@khalwat
Copy link
Collaborator

khalwat commented Apr 22, 2024

And yet it is fixed locally, whereas it did not work before?

I tested and verified the fix here, so I'm suspecting that it's something environmental. Are you able to inspect the seomatic_metabundles database table locally and on QA or staging, to see if the values for the typeId column for the sections/entry types in question are different?

They should be integer values, not strings.

@jwrudzin
Copy link

@khalwat For what it's worth I'm still seeing this issue both locally and on production. I resaved the content SEO settings and cleared all caches in both environments. Live non-working sitemap is here, in case it's helpful. I'll attach a screenshot of the database table you mentioned as well.
Screenshot 2024-04-22 at 9 35 51 PM

@khalwat
Copy link
Collaborator

khalwat commented Apr 23, 2024

@jwrudzin that link doesn't work -- I think you provided the link to the local dev site

@valboivin
Copy link
Author

Yes, the typeId values are integer values and they are exactly the same as the ones I have in local.

@valboivin
Copy link
Author

@khalwat, I think I've found what is causing the bug!
Actually, the only difference I've had between my local Seomatic config and the other environments is that one of my entry type had the Include Images & Videos in Sitemap toggled on while its Sitemap Enabled config was toggled off. I've disabled the images for that entry type and now I can see my link in the sitemap index!

screenshot 2024-04-23 at 10 13 10 AM

@khalwat
Copy link
Collaborator

khalwat commented Apr 23, 2024

That raises another point, you can't have Sitemap Enabled toggled off at the Content SEO settings, and then attempt to selectively turn it back on again at the SEO Settings field level.

It needs to work the other way around, where you keep Sitemap Enabled on for the Content SEO settings (because it is a higher level setting), and selectively disable it for some entries via the SEO Settings field. The Sitemap Enabled Content SEO setting is a higher-level setting that turns it off for that entire section.

@khalwat
Copy link
Collaborator

khalwat commented Apr 23, 2024

@valboivin That's pretty interesting. If you have time, I'd love to see the settings (either via screenshots here, or via a screen share again) that will allow me to replicate this locally.

https://savvycal.com/nystudio107/chat

@jwrudzin
Copy link

jwrudzin commented Jun 5, 2024

@khalwat I just launched another site that's running SEOmatic (v4.0.49), and am still running into this issue.

Here is the link to the non-working sitemap on production. I'm seeing the issue on my local and staging sites as well.

If there's any additional info I can provide to help troubleshoot, let me know!

@khalwat
Copy link
Collaborator

khalwat commented Jun 5, 2024

@jwrudzin Did you update the Content SEO settings for all entry types, as described above?

@jwrudzin
Copy link

@khalwat Interesting, toggling "Include Images & Videos in Sitemap" off and then back on seems to have fixed the issue. I think I'm all set. Thanks for the help!

@khalwat
Copy link
Collaborator

khalwat commented Jun 12, 2024

@jwrudzin right you need to resave the settings for that Content SEO section for the fix to work.

@valboivin
Copy link
Author

@khalwat, just a heads up regarding this! We've upgraded to Craft 5 this week, and that bug with invisible/empty sitemap link reappeared! To fix it, once again, I add to toggle off and toggle back on the "Include Images & Videos in Sitemap" of our default page type config. I'm wondering if there's something worth investigating here. It is pretty odd.

@khalwat
Copy link
Collaborator

khalwat commented Nov 14, 2024

@valboivin very odd... is it possible an old db import was used in the upgrade process that didn't have the changes in it?

@valboivin
Copy link
Author

@khalwat, not possible. We update our content almost everyday, so we couldn't use and old db import for the upgrade. Also, it was "fixed" on all our environments since end of April and we haven't touch Seomatic settings ever since.

@khalwat
Copy link
Collaborator

khalwat commented Nov 14, 2024

That's really odd, because nothing in those settings should be touched by the Craft 4 -> Craft 5 upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants