1 Post
3 years ago

Bonjour à tous,

Je cherche à créer une tâche planifiée qui crée du contenu régulièrement dans Seblod 3.11.

Pour cela j'utilise JCckContent de la forme suivante:

require_once JPATH_BASE . '/libraries/cms/cck/content.php';

$content = new JCckContent( array( 'joomla_article' ) );

$status = $content->create( 'intervention',
 array( 'title'=>'Commande importée', 'state'=>1, 'language'=>'*', 'publish_up'=>JFactory::getDate()->toSql(), ),
 array( 'intervention_no_commande' => $metavalues->_order_key, )

Cela me semble correct, néanmoins, il m'affiche un message d'erreur "Error displaying the error page: Application Instantiation Error: Application Instantiation Error"

Voyez-vous une erreur dans le bout de code ? Peut-on créer des commande CLI (cron) avec JCckContent ?

Bien à vous,

Get a Book for SEBLOD
4229 Posts
3 years ago
Level 1

JCckContent methods are not ready to be used from CLI out of the box due to their coupling with various cms methods, you need to implement a workaround to load cms application so that cms classes get loaded, e.g. JFactory::getApplication('cms');

33 Posts
3 years ago
Level 1

Hello Pascal

I think you can create dynamically content with cron job. Just put your code (tutorial) in a search list and use curl command.or wget command in your cron job to call the url of your search list

It should be working.

I've had never test but i have done something similar.

I do internet of fthing and use electronic card like arduino. I transfer value (sensor) to the web site periodically by send request with my arduino to my website build with seblod.

It's working well for me.



Get a Book for SEBLOD