Errors with Javascript

Hello Dear Community,

i am facing several errors when trying to do particular things for example on dashboard setting other refresh times:

error adding script
sugar_grp1.js?v=IPRwJwAT0cOftzroo7hdkw:1319 SyntaxError: missing ) after argument list
    at eval (<anonymous>)
    at sugar_grp1.js?v=IPRwJwAT0cOftzroo7hdkw:1311
    at Object.globalEval (sugar_grp1.js?v=IPRwJwAT0cOftzroo7hdkw:1311)
    at Object.evalScript (sugar_grp1.js?v=IPRwJwAT0cOftzroo7hdkw:1318)
    at Object.fillInConfigureDiv (MySugar.js?v=IPRwJwAT0cOftzroo7hdkw:198)
    at Object.handleTransactionResponse (sugar_grp1_yui.js?v=IPRwJwAT0cOftzroo7hdkw:109)
    at sugar_grp1_yui.js?v=IPRwJwAT0cOftzroo7hdkw:109
sugar_grp1.js?v=IPRwJwAT0cOftzroo7hdkw:1319 Array(4)
MySugar.js?v=IPRwJwAT0cOftzroo7hdkw:203 Uncaught ReferenceError: newTop is not defined
    at Object.fillInConfigureDiv (MySugar.js?v=IPRwJwAT0cOftzroo7hdkw:203)
    at Object.handleTransactionResponse (sugar_grp1_yui.js?v=IPRwJwAT0cOftzroo7hdkw:109)
    at sugar_grp1_yui.js?v=IPRwJwAT0cOftzroo7hdkw:109
index.php:1 Failed to load resource: the server responded with a status of 404 ()

How can i go after that? Permissions seem to be OK, also JS are already cleaned up and newly set.

Thanks in advance

Hey,

What version of SuiteCRM are you making this change on?

I’m able to set a refresh time on 7.11.15, which does update the dashlet at the set refresh interval.


However, when doing so, I do also see some errors in the console

I’d recommend raising this as a ticket on the SuiteCRM Github Repo, if a ticket doesn’t already exist


In terms of using the dashlet, are you able to confirm if the dashlet does refresh as expected at the timeframe set?

Or does it perhaps not work at all for yourself?

Hi John,

it’s Version 7.11.15

sadly it doesn’t accept my changes - apply doesn’t work. therefore dashlet is not updating (set to not automatically)

Hi,

Hmmm, that’s unfortunate

By chance, what browser are you using?

I’ve given it a try in both Firefox and Chrome, and i’m able to save my change despite the console errors after clicking “Save” on the dashlet’s Editview

I’d recommend perhaps resetting permissions, we recommend the following:

sudo chmod -R 755 .
sudo chmod -R 775 cache custom modules themes data upload config_override.php
sudo chown -R www-data:www-data .

(Replacing www-data with your web server user)

Then, running a Quick Repair and Rebuild
(Found in Admin->Repair)

This should hopefully return functionality
(though I imagine it won’t resolve the error messages seen in console)

Hi John,

yes true thing.

I tried it with Chrome and Edge

i reset the file rights once again, doesn’t change anything. (www-data is fine) and rebuilt, but sadly same result…

Hey,

Sorry, still having some trouble replicating the not-applying issue

I assume you have this issue across all dashlets?
Or if it is with a specific Dashlet, which dashlet are you having issue with?

Do you see any errors in the SuiteCRM.log file?
You may have something in there, if it fails to save

Hi John,

It seems to be Just a activity Log Problem.

Hey Chris,

Thanks for clarifying

Although, I’m still unable to replicate unfortunately, I’ve tried on both Firefox and Chrome

I’m not sure what other variables could be at play here…

Is your instance a fresh install of 7.11.15, or was it upgraded from a previous version?

Do you experience this issue on any particular user, or is it with the Admin user?
(ie no Roles/Group restrictions)

Is this Activity Stream dashlet the one that comes on the dashboard upon install?
Or is this on a new homepage tab/dashboard?

Hi John,

Nothing To thank for. I have to Say :slight_smile:
Actually it is (i think) an old 6.x Install which hot Upgrades everytime and yes it is the Standard Activity Stream. No Difference If User or Admin.

Hey,

Im not entirely sure what the issue is, i’m afraid, as i’m unable to replicate
Though I’ve found a similar situation on the SuiteCRM git repo: https://github.com/salesagility/SuiteCRM/issues/6005

It could be some sort of legacy issue from 6.x that’s been exacerbated through the upgrade process

Or, if any custom changes have been made at some point, it could be that.
Do you know if any custom changes have been made to the instance around the Dashboard/homescreen/activity module that may be conflicting?


Otherwise,
As the error messages you provided initially point towards something in the sugar_grp js, I’d recommend:

Navigate to Admin->Repair
Run “Rebuild JS grouping Files”
Then Clear your browser cache and try again

If you do the above, is there any change?