215 Posts
iliil
7 years ago
8
Topic

Hello friend.

I'm having trouble with generating content dynamically for "object free" Content type in afterStore Plugin.

I have followed this tutorial:

https://www.seblod.com/resources/tutorials/create-content-dynamiclly-using-code

It works for other storage locations ( e.g. joomla_article ) but for "free" type I don't knkw how to properly instantiate JCckContent object. It always returns errors in

ibraries/cms/cck/content.php

Do you have this experience?

Thanks for help

Michal

Get a VIP membership
215 Posts
iliil
7 years ago
3
Level 1

Thanks Klas for a quick reply.

But no, this doesn't help. The tutorial shows the adminstration of a free type in Seblod. I need to generate the free type content in afterstore plugin.

After sumbition of an article, new items of another content type with storage location Free are generated  based on the values of the article.

mic


4229 Posts
Kadministrator
7 years ago
2
Level 2

I'm afraid JcckCOntent is currently not compatible with the free object. This should be very much improved in the next release of Seblod

215 Posts
iliil
7 years ago
1
Level 3

Thanks for info, Klas. I've changed my content type for article object :). Btw, the feature of seblod content creation in php (e.g. before store) is another absolutely fantastic thing in SEBLOD!

Michal

1283 Posts
Bucklash
7 years ago
0
Level 4

When Seblod 11 is released I think it would be great if any willing people add tutorials on creating all the different content types and objects that Seblod allows ... 

tags

menu items

articles

categories

... plus try and highlight the discrepancies/inconsistencies  as there will probably be a few

215 Posts
iliil
7 years ago
1
Level 1

Hello SEBLODERS

I'v seen some changes in 3.11 changelog regarding JCckContent class.

>> use "$content = new JCckContent[OBJECT_NAME];" in order to create new Items from a specific Object.

Does this note mean it's compatible with free object now?

Thanks

Michal

4229 Posts
Kadministrator
7 years ago
0
Level 2

it should be, but I don't know if everything is implemented for free object.

215 Posts
iliil
7 years ago
0
Level 1

Hello

After some research it seems that JCckContent class is still not campatible with object Free.

I'm not fully oriented in SEBLOD structures but to me it seems that new JCckContent[OBJECT_NAME] refers to the class stored in each storage location plugin (article, user, etc.). Unfortunatelly the class folder of free storage location plugin is still empty so JCckContentFree can not be instantiated.

Also, it seems that the create method of JCckContent class still stores more data to '#__cck_store_form_[content type]' and more2 data to '#__cck_store_item_[content type]' only. So no custom table :(

Again, I may be wrong, would be great if SEBLOD team comment

Michal

Get a VIP membership