Advertisement

Batch Article Edit

General questions relating to Joomla! 5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
gsmela
Joomla! Explorer
Joomla! Explorer
Posts: 400
Joined: Thu Jun 10, 2010 12:38 pm

Batch Article Edit

Post by gsmela » Wed Nov 13, 2024 3:11 pm

This viewtopic.php?f=808&t=1013168&p=3734581 ... s#p3734581 today reminded me of the only thing I like about Wordpress.

When any user account is deleted in WP there is an option to assign all the postings from that user to another user. I couldn't find any extension for Joomla that does that. I've changed the assignment of many articles using phpmyadmin but it would be nice if there was an option under the Actions/Batch pull-down selection in Articles.

Advertisement
User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 25268
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Batch Article Edit

Post by pe7er » Wed Nov 13, 2024 4:15 pm

With RO Users (paid extension) you can replace invalid user IDs in content and categories
(which fixes the error JUser: :_load: Unable to load user with ID)
https://extensions.joomla.org/extension/ro-users/
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44757
Joined: Sat Apr 05, 2008 9:58 pm

Re: Batch Article Edit

Post by Webdongle » Thu Nov 14, 2024 1:02 am

https://extensions.joomla.org/extension/db-replacer/ is free
Backup your database first
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17909
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Batch Article Edit

Post by toivo » Thu Nov 14, 2024 1:34 am

Here is an example how to replace missing author ids in bulk by running a SQL script in phpMyAdmin.

The first statement sets the user id of the new author. The CREATE statement creates a temporary table. The subsequent query finds all the articles where the author details cannot be found and adds the article ids to a temporary table, which is then accessed to update those articles with the new author.

The same pattern can be used to update the column 'modified_by'. Replace 'ep28r' with your own table prefix.

Code: Select all

SET @author = 123;
DROP TEMPORARY TABLE IF EXISTS deleted_users;
CREATE TEMPORARY TABLE deleted_users (
`id` int(10) unsigned NOT NULL, PRIMARY KEY (`id`)
)
SELECT c.id FROM ep28r_content c
LEFT JOIN ep28r_users u ON c.created_by = u.id
WHERE u.id IS NULL;
UPDATE ep28r_content c SET c.created_by = @author
WHERE c.id IN(SELECT d.id FROM deleted_users d);
Toivo Talikka, Global Moderator

gsmela
Joomla! Explorer
Joomla! Explorer
Posts: 400
Joined: Thu Jun 10, 2010 12:38 pm

Re: Batch Article Edit

Post by gsmela » Thu Nov 14, 2024 3:11 am

Thank you all for those suggestions! I’ll put them in my toolbox. I haven’t needed to do this very often and I’ve just muddled through phpmyadmin when I’ve needed it. This is a big help!

Advertisement

Post Reply

Return to “General Questions/New to Joomla! 5.x”