Javascript Error "Uncaught SyntaxError: Invalid or unexpected token" on Studio delete field button

Hi,

I'm updating an On-Demand 7.8.2.0 Pro instance. I have a backup of the instance installed on my laptop, that for all intents and purposes appears to be working fine.

I want to delete a custom field. When in Studio when I try to delete a field, the"Delete" button does nothing but logs the following to the error console -

VM2509 index.php?module=ModuleBuilder&action=index&type=studio&bwcFrame=1:1 Uncaught SyntaxError: Invalid or unexpected token

I remove all our custom JS from JSGroupings, cleared the Sugar cache folder, did a Repair & Rebuild, and cleaned out the browser cache. But the error persists.

I can delete the field manually outside of Studio, but I want to be able to delete the field on the on-demand instance too (rather than just ignoring it).

Here are some other actions I tried:

- The ION 7.8.2.0 was recently automatically upgraded by Sugar. Prior to this in the 7.7 version the delete button worked.

- I can create new studio fields on my locally deployed 7.8.2.0 instance. But they too cannot be deleted.

- I deployed a fresh developer instance of 7.8.2.0 to my laptop and confirmed that the delete button works successfully.

Does anyone have any thoughts or tips on what could be causing this issue? Or suggestions on how I might be able to debug it?

Thanks in advance,

Gary.

  • Hi Gary, 

    That sounds much like the following issue where the delete button does not work in some other languages than English US

    https://web.sugarcrm.com/support/issues/77965 

    This has already been fixed in the coming version 7.9 which is planned to be released in the near future, in the meantime as an immediate workaround if you are in any other language (also English UK) you can already switch the language temporarily to English (US) in order to delete the fields.  

    Let me know if that was it,


    Thanks! 

    Dennis

  • Thanks for the pointers. Switching to the language US English resolved the issue.

    For our instance, we were en_UK, and "modules/ModuleBuilder/language/en_UK.lang.php" is missing "\" characters in LBL_CONFIRM_FIELD_DELETE.

     

    //en_UK.lang.php
    'LBL_CONFIRM_FIELD_DELETE'=>"Deleting this custom field will delete both the custom field and all the data related to the custom field in the database. The field will be no longer appear in any module layouts."
            . " If the field is involved in a formula to calculate values for any fields, the formula will no longer work."
            . "\n\nThe field will no longer be available to use in Reports; this change will be in effect after logging out and logging back in to the application. Any reports containing the field will need to be updated in order to be able to be run."
            . "\n\nDo you wish to continue?",


    //en_us.lang.php
    'LBL_CONFIRM_FIELD_DELETE'=>"Deleting this custom field will delete both the custom field and all the data related to the custom field in the database. The field will be no longer appear in any module layouts."
            . " If the field is involved in a formula to calculate values for any fields, the formula will no longer work."
            . "\\n\\nThe field will no longer be available to use in Reports; this change will be in effect after logging out and logging back in to the application. Any reports containing the field will need to be updated in order to be able to be run."
            . "\\n\\nDo you wish to continue?",