Cannot read property 'conversion_rate' of undefined

Hi In the Products Module,

I am trying to hit 'More Products' under the SubProducts Subpanel but it just says 'Loading'. The error is the console is below.Anyone know why this is happening? Tks

logger.js:75 FATAL[2019-8-7 8:17:17]: Uncaught TypeError: Cannot read property 'conversion_rate' of undefined at http://localhost:8888/Moorepay/sugar/sidecar/minified/sidecar.min.js?v=6tsIpMrEo5vVwqHiy4LLWQ on line 1
write @ logger.js:75
currency.js:224 Uncaught TypeError: Cannot read property 'conversion_rate' of undefined
at Object.convertAmount (currency.js:224)
at Object.convertToBase (currency.js:235)
at SE.SidecarExpressionContext.<anonymous> (sugar_sidecar.min.js?v=6tsIpMrEo5vVwqHiy4LLWQ:2009)
at eval (eval at e.exports (addScript.js:9), <anonymous>:5:1507)
at Function.m.each.m.forEach (eval at e.exports (addScript.js:9), <anonymous>:5:2350)
at SE.SidecarExpressionContext.<anonymous> (sugar_sidecar.min.js?v=6tsIpMrEo5vVwqHiy4LLWQ:2006)
at eval (eval at e.exports (addScript.js:9), <anonymous>:5:1507)
at Function.m.each.m.forEach (eval at e.exports (addScript.js:9), <anonymous>:5:2350)
at SE.SidecarExpressionContext.updateRelatedCollectionValues (sugar_sidecar.min.js?v=6tsIpMrEo5vVwqHiy4LLWQ:2004)
at SUGAR.forms.Trigger.<anonymous> (sugar_sidecar.min.js?v=6tsIpMrEo5vVwqHiy4LLWQ:2070)

Parents Reply
  • It seems that one of your Products records has no currency id.

    This query will provide all different currency ids defined in all Products:

    SELECT currency_id, COUNT(*) num FROM products GROUP BY currency_id;

    This other query will provide data from all Products whose currency_id is either NULL or empty:

    SELECT id, name FROM products WHERE currency_id IS NULL OR currency_id = '';

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children