wagn/wagn — pull request #229 by ethn (2014-10-28 21:37:26+00:00)
Title: fixed card_reference bug (but not all the bad data yet)

So, the issue was that we were using #content (effectively #db_content) rather than #raw_content when generating references. This was a particular issue in cases like Apple where there's a structure rule that does not match the db_content. (This is because Apple was created a long time ago, and the db_content was created from an old structure rule but not updated as the structure changed).

Eventually we probably want to do something about this setup, because it's a little odd to create this db_content in the first place.

Much more urgent is the bad data problem. While this patch does appear to fix the problem (locally I edited and saved Apple and the references showed up on Apple+*include), it does nothing to repair all the bad data.

We might try /admin/repair_references, though I suspect this will be a bit slow. I tried it recently, actually, and it didn't seem to work, but that's probably because of this bug! I'll see what it does on the staging server tonight.