Changer en masse le type de document

More
13 years 3 months ago #29960 by Chabi01
Bonjour,
J'ai cherché sur le net et sur le forum mais je n'arrive pas à savoir si ce que je veux faire est possible.
J'ai environ 200 articles sur un site.
Certains articles sont des articles "classique", d'autres sont des articles avec des champs additionnels gérés par Flexicontent (FC V2.00.RC9-r1514 sous J!2.5.7).

J'ai tous mes documents qui se sont retrouvés assignés un type de document (j'en ai 2 : articles et associations) suite à un message de Flexicontent indiquant qu'il me fallait assigner tous mes contenus à un type de contenu.

Hors, je me retrouve du coup avec tous mes contenus assigné à un seul type de contenu.

Y aurait il une commande ou un modif possible au niveau phpmyadmin pour réassigner en masse une centaine de mes articles à l'autre type de contenu plutôt que de les ouvrir un par un à la main ?
Merci !
Cordialement,

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

More
13 years 3 months ago #29962 by Chabi01
I translate the same question here (i don't know if i have to duplicate the post or not).
Hello,
I've search the web and the forum byt i can figure out if i can do what i want.

I have in my website about 200 content articles.
These articles are "classic joomla" one but half of them are articles made with Flexicontent with their additional fields (FC V2.00.RC9-r1514 sous J!2.5.7).

I have all my articles which have been assigned to only one type of document (i have 2 : Joomla classic Content as Articles and another one called "Associations") because i had a message of Flexicontent indicating that i have to bind my articles to at least one type of content.

Now, i have all my contents bind to only one type of content but that's not right.

Is there a command or a possible modification (by phpmyadmin or anything else) to bind some of my articles to the other type of content. If not, i have to bind about half of my content manually...
Thanks !
Cordially,

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

More
13 years 3 months ago #29967 by ggppdk
Yes you can do it massively with an SQL query in phpmyadmin

BUT

do you want ALL items of type1 to become type2 or only SOME of them ???


-- 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
13 years 3 months ago #29970 by Chabi01
Hi,
Only some of them !
Thanks for your help :)

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

More
13 years 3 months ago #29971 by ggppdk
In order to execute such a query to some of them you will need to define the a criteria

e.g.
-- all items of type1 that have id greater than 1123-- -- all items of type1 that belong to cat51
-- all items of type1 that have creation time after dateB

what is your criteria for selecting some of them?


-- 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
13 years 3 months ago #29973 by Chabi01
All items with id from 135 to 247 to put on my type "Association" (maybe i have to know what are the id for the item type before or not ?).
Thanks again :)

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

More
13 years 3 months ago #29975 by Chabi01
I think i have to follow this order :
1. put back all the articles to the native item type (joomla article) : if i do this by phpmyadmin, i dont lose my fields ?
2. put the content with id from 135 to 247 to my type "association".

That's because all the others ids (there is some below 135 and some above 247) should be bind to native joomla article type.

For now, all my content is assigned to "associations"...

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

More
13 years 3 months ago #29982 by ggppdk

Chabi01 wrote: I think i have to follow this order :
1. put back all the articles to the native item type (joomla article) : if i do this by phpmyadmin, i dont lose my fields ?
2. put the content with id from 135 to 247 to my type "association".

That's because all the others ids (there is some below 135 and some above 247) should be bind to native joomla article type.

For now, all my content is assigned to "associations"...


You will not Loose any data with the update SQL queuries,

but if you do not assign all needed fields to article type too, the existing field values will become unusable and will be also delete next time you save an item,

so make sure your content types have the correct fields assigned TO THEM,

so do you want the query for this?


-- 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
13 years 3 months ago #29985 by Chabi01
Ok, i assigned all fields to both type...
And...yes i want it !!! :D

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

More
13 years 3 months ago #30000 by ggppdk
You can use this in phpmyadmin:
Code:
UPDATE JJJ_flexicontent_items_ext SET type_id=1; UPDATE JJJ_flexicontent_items_ext SET type_id=NN WHERE item_id >= 135 AND item_id <= 247;

-- Replace JJJ with your db prefix e.g. jos
-- Replace NN with id of you content type


-- 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