question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ BUG ] Using 'links' option in an entry breaks sitemap generation

See original GitHub issue

Describe the bug When adding the ‘links’ option to a sitemap entry that is already working, it is causing sitemap creation to fail validation. From the ‘Options you can pass’ example:

links: [
    { lang: 'en', url: 'http://test.com/page-1/' },
    { lang: 'ja', url: 'http://test.com/page-1/ja/' }
  ],

Expected behavior I expected the sitemap to add the <xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="alternate" hreflang="en" href="https://url.example" /> entry to the sitemap, which it does. The problem is that the entire sheet fails validation after doing so.

Context:

  • Library Version 7.1.1

Additional context I am currently generating the sitemap with the ‘Serve a sitemap from a server and periodically update it’ example from this package.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

3reactions
duxorcommented, Sep 9, 2022

the same for me…

0reactions
thisfiorecommented, Nov 8, 2022

same here, if I add links I don’t get xml anymore but just a string with link sequences without structure

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug with Yoast SEO's sitemap, extra Links ... - WordPress.org
I believe we can't say that this is a bug produced by our plugin as it is the SEO plugin that is creating...
Read more >
Manage your sitemaps using the Sitemaps report
Use the Sitemaps report to tell Google about any new sitemaps for your property, to see your sitemap submission history, and to see...
Read more >
Broken links bug - Sitemap Generator Forum
Hi, I just installed the latest version of Sitemap Generator, and it reports a broken link which should not be reported.
Read more >
Issues for XML sitemap | Drupal.org
Issues for XML sitemap ; Updating to rc1 changes config entity id which breaks config deployment, Active, Normal ; nofollow link relationship in...
Read more >
How to Find and Fix Broken Links on Your Website
Step 1: Find broken links. There are a number of tools you can use to identify broken links, many of them free. Google...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found