Importation de flux xml dans Flexi

More
11 years 1 month ago #41244 by seabird
Hello,

Every night, I parse and I import XML Files that update the MySql database flexi.
That works, but FLEXIcontent Will ask me to create the missing assets next time I relogin backend.
How to create the assets automatically when importing XML File ?
The problem is that there are 2,000 item update so when I click on "initial authorization", it run without stopping.

Thanks

Chaque soir, je parse et j'importe des fichiers XML qui mettent à jour la base de données MySql flexi.
Cela fonctionne sans problème, mais FLEXIcontent me demande de créer les assets manquants chaque fois que je me reconnecte au backend.
Comment les créer automatiquement lors de l'importation du fichier XML ?
Le problème est qu'il y a au alentour de 2000 articles mis à jour donc lorsque je clique sur "autorisation initiale", cela "mouline" sans s'arrêter.

Merci,

Eric

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #41247 by micker
sans vouloir te vendre un composant ..; (j'ai aucune actions) a mmon avis utilise FLEXIimport pour ca ...
il gère parfaitement ce genre de chose grâce à des taches crons et autres subtilités
a+

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #41249 by ggppdk
Hello

Question: does it complete, after clicking several times ?

Question: you want to add asset creation into your custom code, is this what you are asking ?

Normally,
when a new item is created, various task are done
e.g.
- asset (ACL) record is created
- the onContentSave event of content plugins is triggered on the saved text
- the above even will also trigger the finder plugins of smart index, so joomla smart-index will be created
- the FLEXIcontent advanced search index is updated
- FLEXIcontent plugin events are triggered

so the proper way to do the above is to call the
save() method of the FLEXIcontent Item model

- lately FLEXIcontent CSV import was added preview and AJAX-based import, so you could try this too

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #41253 by seabird

ggppdk wrote: Question: does it complete, after clicking several times ?

Yes, when I login and click on "initial authorization", it run without stopping (always run).





And if I close browser and re-open browser and relogin, the click doesn't work.


ggppdk wrote: Question: you want to add asset creation into your custom code, is this what you are asking ?

Yes, I want add asset creation in my custom code.

Thanks,

Eric

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #41256 by ggppdk
Hello,

i have not tested this, but you could try to load the item into a flexicontent_items JTable and then save it
Code:
$id = 555; // put your item id here require_once (JPATH_ADMINISTRATOR.DS.'components/com_flexicontent/defineconstants.php'); JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_flexicontent'.DS.'tables'); $item = JTable::getInstance( $type = 'flexicontent_items', $prefix = '', $config = array() ); $item->load( $id ); $item->store();


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #41273 by seabird
Thanks,
Its Ok, it work fine but its very very long to execute for all new items (~2000)

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.602 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline