Creating new custom fields no longer works

From JReviews Documentation
Revision as of 10:56, 22 March 2020 by Jreviews (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

If you have a lot of custom fields in the Fields Manager and creating new custom fields stopped working, the reason is that you reached the database limit for columns in a table. To increase the possible number of custom fields, it is necessary to set an optimal number of Maximum Characters for existing fields in the Fields Manager.

Most field types in JReviews use varchar for the column datatype in the database which makes it possible to add indexes and improve performance.

By default, when you create a custom field, JReviews will assign it maximum 255 characters. Most likely some of your custom fields don't need that many characters and reducing this number for those existing fields will open up space for new custom fields.

To adjust the number of maximum characters, go to the Fields Manager, click on one of the field names, locate the Maximum Characters setting and click the button to adjust the number of maximum characters, for example:

Maximum-characters-setting.png


In this example for the City custom field, JReviews tells us that currently the longest existing city value has 15 characters, but we set the "Maximum Characters" setting to 30, just in case longer values will be necessary later.

If the setting was set to 255 by default and you reduced it to 30, that will open up space for several new fields.

Multiple select and Checkboxes field types will require more characters because each listing can store multiple field values.

If you find that reducing the number of characters no longer helps when trying to create new custom fields, then you may need to resort to changing the column data type of some of your text, radio, select, multiselect and checkbox custom fields from VARCHAR to TEXT. You can do this through phpMyAdmin or any other database client. Find the #__jreviews_content table and check the structure, then find the table columns that correspond to the fields you want to change.

Varchar-to-text.jpg