CrispinP
Well-known member
Hi folks,
I have an add-on which extends data writer. The hint used is "XenResource_DataWriter_Update"
In my _postSave function I can see the resource_id when a resource is added but the discussion_thread_id is always zero.
My code:
Here is what I get when I get a resource in the function:
If I hardcode a previously saved id, 300, I do get the value back.
Why is it not available the way I am doing it? I'm really confused.
TIA
Crispin
I have an add-on which extends data writer. The hint used is "XenResource_DataWriter_Update"
In my _postSave function I can see the resource_id when a resource is added but the discussion_thread_id is always zero.
My code:
Code:
$f = $this->getModelFromCache('XenResource_Model_Resource');
print_r($f->getResourceById($this->get('resource_id')));
die("dead");
Here is what I get when I get a resource in the function:
Code:
(
[resource_id] => 312
[title] => sdf
[tag_line] => asdfasf
[user_id] => 1
[username] => Crispin
[resource_state] => visible
[resource_date] => 1469051740
[resource_category_id] => 6
[current_version_id] => 0
[description_update_id] => 0
[discussion_thread_id] => 0
[external_url] =>
[is_fileless] => 0
[external_purchase_url] =>
[price] => 0.00
[currency] =>
[download_count] => 0
[rating_count] => 0
[rating_sum] => 0
[rating_avg] => 0
[rating_weighted] => 3
[update_count] => 0
[review_count] => 0
[last_update] => 1469051740
[alt_support_url] =>
[had_first_visible] => 1
[custom_resource_fields] => a:0:{}
[prefix_id] => 0
[icon_date] => 0
[tags] => a:0:{}
)
If I hardcode a previously saved id, 300, I do get the value back.
Why is it not available the way I am doing it? I'm really confused.
TIA
Crispin