"Call to undefined method Joomla\CMS\Document\XmlDocument::addCustomTag()" Error

In some Joomla sites, you may see the "Call to undefined method Joomla\CMS\Document\XmlDocument::addCustomTag()" error. You may see it trying to view either your site XML or Images sitemaps.

call to undefined method

The most likely reason for this error may be one of the 3-rd party system plugins you installed.

Here is how to find which one of them is the source of the error.

  • In your Joomla administrator panel, go to "Extensions" > "Plugins":

go to extensions plugins

  • This will bring you to the "Plugins" screen. Click the "Search Tools" button:

click the search tools button

  • You will see the four filters appear. Click inside the "Select Type" filter:

click select type

  • You will see a dropdown list of the types of plugins. Click "system":

set the filter to the system

  • Disable filtered system plugins one by one by clicking on the box next to the name of the plugin and check if the error disappeared:

disable plugins one by one

  • Keep disabling your 3-rd party system plugins until you find the one that causes the "Call to undefined method ..." error.