• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

[SOLVED] Sitemap XML for own content-type

Chris D

XenForo developer
Staff member
#2
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).
 

Mr. Goodie2Shoes

Well-known member
#3
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
 

Chris D

XenForo developer
Staff member
#4
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.
 

Jeff Berry

Well-known member
#6
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: