ORM 5.0.25 Can't find variable: Opal

// Expert user has replied.
C Chris Child 3 years 6 months ago
3 6 0

Hi all,

I posted an issue related to this before the holidays but the discussion strayed way off from what I was trying to find a solution for so I'm posting a new topic.

We just switched to the new 5.0 SP1 or 5.0.25 release as it provided us with a fix to an issue with Windows Desktop touch functionality. In doing so though it looks like a new issue has risen with the ORM functionality. In the logs I see the following message right after the call to my ORM function.

ReferenceError: Can't find variable: Opal

Which is coming from rhoapi-modules-ORM.js line 422.

In case it is needed here is my call to the ORM:

Rho.ORM.addModel(function(model) {
            model.modelName("Order");
            model.enable("sync");
            model.property("LI_Date","string");
            model.property("LI_OrderId","string");
            model.set("partition", "order");
        });

Thanks

Chris

Please Register or Login to post a reply

6 Replies

M Mark Ross

I finally received a response back from my support ticket and it fixed this issue.  Here's the response:

To prevent this error message while using JavaScript ORM API in 5.0.25, please kindly refer to the document below for implementation: http://docs.rhomobile.com/en/5.0.25/api/Orm
Below is a portion of snippet for your kind reference:

S Sean Kennedy

We have ZenDesk tickets open for this issue. We will update when we have a solution.

R Robert Galvin

Just curious if you tried reverting back to the previous ORM JS:

To enable/continue usage of Old ORM API for existing Rhodes app

In "rhoconfig.txt" file remove 'use_new_orm' option or set it as use_new_orm = 0
Make sure that your main html file includes references to both files

rhoapi-modules.js
rhoapi-modules-ORM.js

M Mark Ross

I am already using the old ORM API, which was working just fine in version 5.0.  The upgrade to 5.0.25 caused the error for me without any code changes within my app.

R Ruben Ruben

Same issue here, any update?

M Mark Ross

I'm running into the exact issue as Chris.  My application was working just fine before upgrading from 5.0.2 to 5.0.25.  Now I get the same error:

"ReferenceError: Can't find variable: Opal"

and my app fails to run.  Need a fix for this issue ASAP.

-Mark

CONTACT
Can’t find what you’re looking for?