Unknown column 'm.publish_up' in 'where clause' Topic is solved

Need help upgrading your Joomla! website or converting to Joomla! 4.x?

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 41891
Joined: Sat Apr 05, 2008 9:58 pm

Re: Unknown column 'm.publish_up' in 'where clause'

Post by Webdongle » Mon Jan 31, 2022 12:23 am

Cleanest method is imho
Method
  • Update the database with files from a fresh Joomla 3.10.1 install
  • Install the 3rd party extensions into a fresh Joomla install
  • Then connect the Joomla and 3rd party extension files to the updated database.
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
sozzled
Joomla! Master
Joomla! Master
Posts: 12663
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Unknown column 'm.publish_up' in 'where clause'

Post by sozzled » Mon Jan 31, 2022 12:33 am

Complicated and time-consuming, @Webdongle: this was a production website—no doubt with articles, menus, images and who-knows-what features that the OP was using. The OP says they have a backup copy of the website before the problems began; the simplest method, therefore, is to restore the website from that backup copy in an empty [root] folder and an empty database. It's a 10-minute task.

Trying to patch up a broken website by salvaging bits and pieces will probably take hours (possibly a day or two) depending on what bits and pieces are salvageable.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

User avatar
ceford
Joomla! Ace
Joomla! Ace
Posts: 1161
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Unknown column 'm.publish_up' in 'where clause'

Post by ceford » Mon Jan 31, 2022 8:40 am

Use phpMyAdmin to look at the structure of the #__menu table - the last two columns should be publish_up and publish_down, both datetime types with NULL defaults. Are they present? If not, add them.

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

Re: Unknown column 'm.publish_up' in 'where clause'

Post by Webdongle » Mon Jan 31, 2022 10:53 pm

sozzled wrote:
Mon Jan 31, 2022 12:33 am
... the simplest method, therefore, is to restore the website from that backup copy in an empty [root] folder and an empty database. It's a 10-minute task....
So is installing Joomla and editing the configuration.php. Another quick method would be to install a fresh J4 and use something like j2xml to port the data over. Then install the 3rd party extensions that are compatible. Just as quick as uninstalling incompatible 3rd party extensions. Which ever method you use you will need to identify 3rd party extensions and reposition the module positions of the extensions that you keep.
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".

bpratt
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon May 12, 2008 9:40 am

Re: Unknown column 'm.publish_up' in 'where clause'

Post by bpratt » Mon Jan 31, 2022 11:23 pm

Webdongle wrote:
Mon Jan 31, 2022 10:53 pm
Another quick method would be to install a fresh J4 and use something like j2xml to port the data over. Then install the 3rd party extensions that are compatible. Just as quick as uninstalling incompatible 3rd party extensions.
Something that for those of us that have come through all the versions since 1.5 have discovered so much rubbish littering our joomla database will no doubt attest to.
Last edited by toivo on Tue Feb 01, 2022 2:40 am, edited 1 time in total.
Reason: mod note: added preceding sentence to the quote on request

bonielse
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Mon Apr 23, 2012 4:18 pm
Location: Valby, Denmark

Re: Unknown column 'm.publish_up' in 'where clause'

Post by bonielse » Sun Feb 06, 2022 8:47 am

Thanks for all your feedback.

Found the "root cause"¨; my Joomla co-administrator.
Back in August he did a quick testupgrade. Ran into issues, and didn't had time to fix. Hence he re-installed the backup.

But he didn't stick to the agreements we had: Do not test in production and use an empty database/filestructure when re-storing a backup.

As you say there is no quick solution. Need to re-store backup from August and the add since then.
The website is running without issues. Hence I can wait till next summer where we have 2 months off season.

Again; thanks for clearing out.

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

Re: Unknown column 'm.publish_up' in 'where clause'

Post by toivo » Sun Feb 06, 2022 9:44 am

Thank you for the update! It may help others who encounter similar issues.
Toivo Talikka, Global Moderator

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

Re: Unknown column 'm.publish_up' in 'where clause'

Post by Webdongle » Sun Feb 06, 2022 12:09 pm

With Akeeba you can have the site automatically create a backup before the backup starts.
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
ceford
Joomla! Ace
Joomla! Ace
Posts: 1161
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Unknown column 'm.publish_up' in 'where clause'

Post by ceford » Sun Feb 06, 2022 2:57 pm

One thing we have learned from other threads about failed updates is look in administrator/logs/joomla_update.php where there is a complete list of queries executed, or incomplete in the case of a failed update.

shiftCase
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Thu Jun 17, 2010 9:27 pm

Re: Unknown column 'm.publish_up' in 'where clause'

Post by shiftCase » Wed Aug 24, 2022 6:45 pm

I'm getting the same error, but the database from my production J3 database has none of those tables - and after the failed 3.10.11 > 4.1.5 update, neither does the resulting database.

My working update build is an Akeeba backup of the production site in a separate sandbox.

User avatar
mamboline
Joomla! Intern
Joomla! Intern
Posts: 95
Joined: Wed Oct 05, 2005 12:42 pm
Location: Beograd, Serbia
Contact:

Re: Unknown column 'm.publish_up' in 'where clause'

Post by mamboline » Thu Sep 22, 2022 1:36 pm

ceford wrote:
Mon Jan 31, 2022 8:40 am
Use phpMyAdmin to look at the structure of the #__menu table - the last two columns should be publish_up and publish_down, both datetime types with NULL defaults. Are they present? If not, add them.
Just had exactly the same error during the upgrade of one of my Joomla sites and this advice helped me!

Thank you!
https://www.hotjoomlatemplates.com - Joomla templates
https://www.designdestiny.net - Design and Joomla development


Post Reply

Return to “Migrating and Upgrading to Joomla! 4.x”