We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24719
    • 194 Posts
    yeah, it’s bizarre
      • 24719
      • 194 Posts
      i think i’ve found the cause of this problem. i’ve just had a similar thing happen elsewhere, and i think the problem comes from the following line, defining ’property’ as not null, but then leaving the default value as an empty string. Although this is acceptable in the db, i think this is what’s causing the problem for me.

      <field key="property" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="" index="index" />


      if i change the default value to "0", it worked.
        • 28840
        • 46 Posts
        Just for information - i had the same problem, the modx error.log keep saying that pk is missing. No matter what, i couldnt make the $object->save() function to work.
        So i just changed in my schema from xpdosimpleobject to xpdoobject and added the "id" field myself (@redman line) and it worked.


        Sumoborac