XML Sitemap Generator: Troubleshooting
Troubleshooting the XML Sitemap Generator in OXID eShop 7: empty or missing sitemaps, files not reachable, overwritten languages, admin button errors, truncated URLs.
XML Sitemap Generator: Troubleshooting
The command "mmd:sitemap:generate" is not known
Check: Is the module installed and activated?
vendor/bin/oe-console oe:module:activate mmd_sitemap
vendor/bin/oe-console oe:cache:clear
Then call the command again. The command is registered together with the module, not before.
No file is created or "No URLs for ..."
Check:
- Is the content type enabled in the settings? Disabled types are reported as skipped
- Are the objects active and not hidden?
- Do the objects have an SEO URL in the respective language? The queries join the table
oxseo, objects without an SEO URL are missing from the sitemap - For products: are they only variants while "Exclude Variants" is on?
- For categories and manufacturers: is "Exclude Empty Categories" or "Exclude Empty Manufacturers" on, and are there active products?
Fix: Have the SEO URLs regenerated in the OXID admin and review the filter settings.
The file sitemap-static.xml is missing
Check:
- Is Enable Static URLs switched on? It is off by default
- Are there active entries in the table
mmd_sitemap_static_urlswithOXSHOPID= 1? - Does the table exist? If it is missing, deactivate and reactivate the module once
The sitemap contains only one language
With several languages, all passes write to the same file, and the language processed last remains.
Fix: Generate the language you want explicitly with -l <language ID>. The language ID corresponds to the order of the languages in the shop configuration, starting at 0.
The index sitemap.xml lists only some of the files
The index contains only the files of the last run. After a run with -t or -l, the other files stay in the directory but are no longer in the index.
Fix: Generate all types in one run again (mmd:sitemap:generate without -t).
The sitemap URL returns an error or 404
Check:
- Is
sitemap.xmlreally located insource/<output directory>/? The default issource/export/ - Does the URL follow the pattern
<shop URL>/<output directory>/sitemap.xml? The shop URL comes from the URL field of the shop with ID 1 - Does an
.htaccessor web server rule block the directoryexport?
Fix: Change the output directory in the settings to a publicly reachable directory below source/ and regenerate the sitemap.
The URLs in the sitemap have no host
The addresses of the content are built from the language URL of the respective language plus the SEO URL. If the language URL is missing, the module falls back to the shop URL; if it is set to an empty value, the host stays empty.
Check: Is there an empty value in the language URLs of the shop configuration (aLanguageURLs), and is the shop URL of the shop with ID 1 set?
The "Generate Sitemap" button reports "Console command not found"
Check:
- Does
vendor/bin/oe-consoleexist in the shop root, the directory abovesource/? - Is
exec()allowed in the PHP configuration of the web server?
Fix: Start the generation from the console or a cron job instead.
"Failed to write ..." during generation
The module cannot write the file.
Check: Write permissions of the web server or console user on the output directory. The module creates missing directories with mode 0755.
URLs are missing in very large shops
For products, categories, CMS pages and manufacturers, at most 50,000 URLs are written per type, further ones are cut off. There is no split into several files, and the setting "Max URLs per Sitemap" does not change that. Products are sorted by modification date in descending order, so the most recent products are kept. The static sitemap has no limit.
Files from earlier runs are still there
The module only deletes with --clear, and then all sitemap*.xml files in the output directory. Without --clear, files from earlier runs stay, including types that have since been disabled. They are not listed in the new index, though.