News:

Join the Facebook Fan Page.

Main Menu

Old version update issues

Started by caspian1965, April 15, 2021, 01:08:18 AM

Previous topic - Next topic

caspian1965

First, I want to apologize for having to ask for help with this...

I have a web forum that I took over 10 or so years back.  Time went on and I pretty much let it go without performing any maintenance.  Fast forward to recently, the forum was at version 2.0.5.  Whenever hostmonster does a php update, it breaks the site and they have to back-rev. 

I pulled down all the mod updates, installed them all one by one, everything seemed ok.  Went to to the forum to check it and received this error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY b.board_order' at line 21
File: /home3/concour3/public_html/forum/Sources/Subs-BoardIndex.php
Line: 72

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.8, while your database is at version 2.0.1. The above error might possibly go away if you execute the latest version of upgrade.php.


Backed out mods all the way to 2.0.7, which is working.  Going from 2.0.7 to 2.0.8 yields the error above.

I read up on the forum here and there were recommendations to remove a MySQL sort mod, but I don't have that mod installed.

We have a sizable database and a custom theme, so I was hoping to not have to do a full site rebuild.

Thanks for any help with this.

shadav

can you post your Subs-BoardIndex.php at the lines that are showing the errors....chances are you are just missing a , somewhere
post the line that it says has an issue and maybe a line or two before and after

caspian1965

Thanks for the reply.  Here's the section:





      WHERE {query_see_board}' . (empty($boardIndexOptions['countChildPosts']) ? (empty($boardIndexOptions['base_level']) ? '' : '
         AND b.child_level >= {int:child_level}') : '
         AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1)) . ' ORDER BY b.board_order',
      array(
         'current_member' => $user_info['id'],
         'child_level' => $boardIndexOptions['base_level'],
         'blank_string' => '',
      )

shadav

what mod did you install? seems maybe it didn't fully install

a default file has this

WHERE {query_see_board}' . (empty($boardIndexOptions['countChildPosts']) ? (empty($boardIndexOptions['base_level']) ? '' : '
AND b.child_level >= {int:child_level}') : '
AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1)),
array(
'current_member' => $user_info['id'],
'child_level' => $boardIndexOptions['base_level'],
'blank_string' => '',
)


you have a random
. ' ORDER BY b.board_order' thrown in there

caspian1965

Here's the mod list:

1.   SMF 2.0.7 Update   1.0   
2.   SMF 1.1.19 / 2.0.6 Update   1.0   
3.   SMF 2.0.5 Update   1.0   
4.   SMF 2.0.4 Update   1.0   
5.   SMF 2.0.3 Update   1.0   
6.   SMF 2.0.2 Update   1.0   
7.   Simple Audio Video Embedder   2.0.3   
8.   MessagePreviewOnHover   1.8   
9.   Treasury   2.10   
10.   SMF Gallery Pro   3.0.20   
11.   Footnotes   1.05   
12.   Highslide 4 SMF   0.5e   
13.   PDF Tag   1.2   

shadav

off the top of my head I don't think anything listed there adds that bit in so just delete the
. ' ORDER BY b.board_order'
and you should be ok

Steve

Make a copy of the file first though.
DO NOT pm me for support!

caspian1965

Removing that section worked, site is now patched to 2.0.18

Thanks!

Advertisement: