[SOLVED] Sitemap XML for own content-type

You need to define your content type in xf_content_type too.

After that you need to rebuild the content types cache.

One way of doing that is to export your add on and then use that to upgrade your add on (the cache is rebuilt when any add on is installed or upgraded).
 
One way of doing that is to export your add on and then use that to upgrade your add on (the cache is rebuilt when any add on is installed or upgraded).
Wouldn't calling
PHP:
XenForo_Model::create('XenForo_Model_ContentType')->rebuildContentTypeCache()
suffice? It's a major pain to do a global rebuild :P
 
It's not really a pain to run an add on upgrade.

Your method is valid. I know there are multiple ways of doing it. Personally I use my content type management add on.
 
No need to delete add-ons or rebuild caches, this is the simplest way (IMO) to reset your content types. Just a simple SQL query.
PHP:
DELETE FROM xf_data_registry WHERE data_key = 'contentTypes';
UPDATE xf_content_type SET fields = '';
This will force the previous user's suggestion to automatically run on the next page load:
PHP:
XenForo_Model::create('XenForo_Model_ContentType')->rebuildContentTypeCache();
 
Last edited:
Top Bottom