Check the return values of addPackage() and getObject().
On failure, addPackage() will return false and getObject() will be empty.
Also, be sure that after you edited the schema, you regenerated the class and map files and deleted all files in the core/cache directory.
Hi BobRay,
Thank you for perservering with me.
I have checked the return values of addPackage() and getObject(), they return both a lot of data but are at least not false or empty. However could you confirm how I should cjeck this to make surre I am doing it correctly.
The schema is definitely up to date and I have deleted the core/cache files a numbrer of times.
I am successfully pulling and displaying data from the same table on this and other pages. So I at least have a connection, I just can't update the table. Any other ideas?
Cheers Adam
Could this be it? You have to create new class and map files with parseSchema() after any change in the Schema file. AFAIK, The schema file itself is ignored during normal operations.
-
MODX Staff
- 10,725 Posts
That is correct—the schema file is only used for generating the class/map files that are used during runtime. This is a design-time only element of a model.