Asset Map not loading (after upgrade to 3.18.2)

If I access the backend using a url for which there is a website defined, The asset map doesn’t load, and in the source I can find the following error:


[font=“Courier New”]<b>Fatal error</b>: Uncaught exception ‘Exception’ with message ‘Unable to adjust real sort order for majorid: 1 due to database error: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: &quot;&quot;’ in /CMS/TRAIN/mysource_matrix/core/lib/asset_map/asset_map.inc:230

Stack trace:

#0 /CMS/TRAIN/mysource_matrix/core/lib/asset_map/asset_map.inc(445): Asset_Map-&gt;_getInitialLineageSelection(‘complex’)

#1 /CMS/TRAIN/mysource_matrix/core/include/backend.inc(1151): Asset_Map-&gt;embedAssetMap(‘complex’, 275)

#2 /CMS/TRAIN/mysource_matrix/core/include/backend.inc(185): Backend-&gt;_printSideNav()

#3 /CMS/TRAIN/mysource_matrix/core/include/mysource.inc(368): Backend-&gt;paint()

#4 /CMS/TRAIN/mysource_matrix/core/web/index.php(30): MySource-&gt;start()

#5 {main}

thrown in <b>/CMS/TRAIN/mysource_matrix/core/lib/asset_map/asset_map.inc</b> on line <b>230</b><br />[/font]





Postgres Error Log shows the following:



[font=“Courier New”]invalid input syntax for integer: “”

STATEMENT: SELECT count(*) FROM sq_ast_lnk

WHERE majorid = $1

AND sort_order < $2

AND link_type > 2[/font]

Any ideas what this problem might be?