Importation de flux xml dans Flexi

More
12 years 3 months 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
12 years 3 months 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
12 years 3 months 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 review. Thanks!

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

More
12 years 3 months 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
12 years 3 months 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 review. Thanks!

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

More
12 years 3 months 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.

More
12 years 3 months ago #41275 by ggppdk
Hello

creating assets for 2000 items is a lot,
it could even timeout , the joomla assets creating functions are used

e.g. if you wanted to trigger the Joomla Smart search index creation , you may need as much as 0.2 - 1 second per item (if you have a 10,000 item site) so for 2,000 items you would need as much as 400-2000 seconds to update the Joomla smart search index

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 review. Thanks!

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

More
12 years 3 months ago #41277 by seabird

micker wrote: 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+


J'ai juste ce problème d'assets à résoudre. Mais si ce n'est pas concluant ( je suis relativement pressé) , je suis tout disposé à utiliser ce composant que je ne connais pas.
Est ce que tu l'as utilisé ou quelqu'un d'autre ?
Voilà ce que je fais en gros:
Je dois parser surtout plusieurs flux RSS (chaque jour) et je dois enregistrer tout en bdd ( au alentour de 6 champs différents par item), ce qui fait au total en gros 2500 items. Il y a aussi une vérification quotitienne des articles obsolètes (date dépassée) qui sont alors effacés automatiquement ainsi bien sur que leur champs associés.
Pour ce qui est de la suppression, je n'ai pas de soucis.
Seule l'enregistrement en bdd à cause des assets me pose problème.
En résumé, FLEXIimport est-il capable d'importer les données de plusieurs flux RSS en mettant correctement les assets?

Merci,

Eric

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

More
12 years 3 months ago #41279 by seabird

ggppdk wrote: Hello

creating assets for 2000 items is a lot,
it could even timeout , the joomla assets creating functions are used

e.g. if you wanted to trigger the Joomla Smart search index creation , you may need as much as 0.2 - 1 second per item (if you have a 10,000 item site) so for 2,000 items you would need as much as 400-2000 seconds to update the Joomla smart search index

Regards


Yes, I have a 504 error .
I have timeout too with for example 300 items.
I don't know how to do this...

Regards

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

More
12 years 3 months ago #41280 by ggppdk
Hello

note about the built-in CSV import we have:

- [v2.1.1] data preview of all parsed lines (thus you verify the CSV format)

- [v2.1.1] the import procedure was made multi-step via using AJAX !! and you can set number of items pers step (with ability to continue stopped import if you have not closed browser window or if you restore session after browser crashes) [v2.1.1]

- [v2.1.0] also you may want to set the default configuration for import task in Component configuration so that you do not have to re-enter it

- [v2.1.0] you can import images and files from a server folder, with checking if they exist


-- 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 review. Thanks!

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

Moderators: vistamediajoomlacornerggppdk
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
Save