Full database not displaying

7 posts by 2 authors in: Forums > CMS Builder
Last Post: April 15, 2014   (RSS)

By seotech - April 13, 2014

A couple of years ago we had a custom site built by Interactive Tools, and we are now experiencing a problem with the database. 

The site allows someone to create articles, and to create entities which will then be associated with those articles.

When someone creates a new article, a list of possible entitlies appears below the article and the author then selects via checkboxes which entities are associated with that article.

The list of entities has grown very large and I suspect a limit may have been imposed on the number that can be displayed as the list now stops half way through the W's (it is an alphabetical list) and so  ot all the entities appear in the list.

Can someone help?

By seotech - April 14, 2014

Hi Chris,

There are 2073 entities in the database and when you add a new article and the entities appear they stop at 2000.

There must have been some limit placed there that needs to be changed.

John

By Chris - April 14, 2014

Hi John,

Where are people going to create a new article? Is it in your cmsAdmin interface or a custom front-end page?

If it's in the cmsAdmin interface, can you open up /cmsAdmin/lib/database_functions.php in a text editor and search for "LIMIT 0" (without the quotes) and tell me if you find a line like this?

      $query        = "SELECT `$valueField`, `$labelField` FROM `$selectTable` $where $orderBy LIMIT 0, 999";

Has your line been changed to 2000 from 999?

All the best,
Chris

By seotech - April 14, 2014

Hi Chris, spot on - I downloaded the database_functions.php file, changed that value from 2000 to 5000, and the problem appears to be solved - I hope that is what you had in mind?

John

By Chris - April 15, 2014

Hi John,

Yes, glad that helped.

If you haven't already documented that change, I'd recommend creating a file called CUSTOM_CHANGES.txt in your cmsAdmin directory so that, when someone upgrades CMS Builder in the future, they won't be confused about why the list stops at 999.

All the best,
Chris

By seotech - April 15, 2014

Thanks Chris, I appreciate the help and advice!

John