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

Can't deals with "Report handler"

A

account8226

Guest
#1
Hello,

I'm having problems with my report handler. I was able to set up a like handler for one content without any problems, but I can't get my report handler work on an other content.

The problem is the following : my 'fields' column in 'xf_content_type' doesn't get filled up, it's stuck to 0 bytes even after I added a xf_content_field' row for this.

Any ideas ?

Kind regards.
 

Dan

Well-known member
#2
Hello,

I'm having problems with my report handler. I was able to set up a like handler for one content without any problems, but I can't get my report handler work on an other content.

The problem is the following : my 'fields' column in 'xf_content_type' doesn't get filled up, it's stuck to 0 bytes even after I added a xf_content_field' row for this.

Any ideas ?

Kind regards.
Did you rebuild the content type cache?
run the following code, which will fill the xf_content_type fields
PHP:
$this->getModelFromCache('XenForo_Model_ContentType')->rebuildContentTypeCache();
 
A

account8226

Guest
#5
Did you rebuild the content type cache?
run the following code, which will fill the xf_content_type fields
PHP:
$this->getModelFromCache('XenForo_Model_ContentType')->rebuildContentTypeCache();
Working like a charm, thanks you very much EL :) :D
 

Dan

Well-known member
#6
If you need this often, i would suggest to create a own controller, to manage the fields^^
Another simple solution would be just to extend the misc controller and add a additional action
PHP:
class ElDevtools_Extend_ControllerPublic_Misc extends
XFCP_ElDevtools_Extend_ControllerPublic_Misc
{
public function actionRebuildContainerAndCache()
{
$this->getModelFromCache('XenForo_Model_ContentType')->rebuildContentTypeCache();
return $this->responseMessage('..');
}
}
 
A

account8226

Guest
#7
If you need this often, i would suggest to create a own controller, to manage the fields^^
Another simple solution would be just to extend the misc controller and add a additional action
PHP:
class ElDevtools_Extend_ControllerPublic_Misc extends
XFCP_ElDevtools_Extend_ControllerPublic_Misc
{
public function actionRebuildContainerAndCache()
{
$this->getModelFromCache('XenForo_Model_ContentType')->rebuildContentTypeCache();
$container = new DIC_Container();
$container->deleteContainer();
return $this->responseMessage('..');
}
}
Or a custom cron entry, that you would run manually ?
 

Dan

Well-known member
#8
1. You'll still wouldn't be able to test it immediately because you would have to wait for the cron to run
2. Overhead, because the data aren't changing often

But if it would work for you, why not?:D
 
A

account8226

Guest
#9
There are loads of ways to do it ^^

But for the cron entry I was thinking about a manual run, you can run a cron task without waiting, under the cron tab.

Thanks for the help, I was stuck but it's reporting correctly now :)