7.11.15 Upgrade Failure on Users Module Vardefs file field declaration

Hi Folks,

For the last several upgrades the Users module vardefs file has included syntax errors erroneously appending " (30)" to the declaration for the first_name and last_name columns.

I fix this mid upgrade e.g. after the upgrade file copy step and before committing by amending the file modules/Users/vardefs to remove the " (30)" suffix.

This error is a recurring theme in the forums and an easy result to find on Google. It would seem this is a quick change to fix and commit.

Iā€™d hope this issue is high on the list to fix and we donā€™t experience a 7.11.16 release which fails in the same way during upgrade.

Regards,
Ian

Hi

It is not a simple issue, I am afraid. It works well in a bunch of test scenarios and I havenā€™t seen a reproducible error scenario yet. :frowning:

It probably depends on

  • which exact version youā€™re coming from, and which youā€™re going to
  • if you have stuff in custom that is keeping the updated files form taking effect (those error messages that the upgrade wizard shows, but everybody typically ignores

Hey,
Along with what pgr has said, iā€™ve noticed an issue on the SuiteCRM github page in which someone has detailed the issue when on an MSSQL / Windows environment

By chance, what sort of environment are you on?
Perhaps we can find some sort of pattern

Hi pgr,

This appears an easy fix;

Download SuiteCRM-Upgrade-7.11.x-to-7.11.15.zip from https://suitecrm.com/download/ , within the zip archive review the file vardefs.php in SuiteCRM-Upgrade-7.11.x-to-7.11.15\modules\users directory

You need to correct the syntax

'indices' => array(
    array(
        'name' => 'userspk',
        'type' => 'primary',
        'fields' => array(
            'id'
        )
    ),
    array(
        'name' => 'idx_user_name',
        'type' => 'index',
        'fields' => array(
            'user_name',
            'is_group',
            'status',
            'last_name (30)',
            'first_name (30)',
            'id'
        )
    ),
),

to

'indices' => array(
    array(
        'name' => 'userspk',
        'type' => 'primary',
        'fields' => array(
            'id'
        )
    ),
    array(
        'name' => 'idx_user_name',
        'type' => 'index',
        'fields' => array(
            'user_name',
            'is_group',
            'status',
            'last_name',
            'first_name',
            'id'
        )
    ),
),

Kind Regards,
Ian

But this all started when increasing the fieldsā€™ length (which makes sense, in some countries long names are common)

So the idea is to make them longer. The problem seems to be that the vardefs/database syncing of the data formats doesnā€™t work correctly for some people :confused:

It should take just a QR&R followed by the SQL query it suggests, but for some reason it keeps repeating on some systems, and isnā€™t effective.