I'm working on an API that pulls data from a Drupal site. Everything has gone pretty well I normally use Drupal Bootstrap to load Drupal use the functions I need then spit out a JSON array. I am having one issue though with a module, for some reason Drupal's schema doesn't seem to think the table exists. The module I am working with is VotingApi.
So in my API call I connect to the drupal db. Then if I run:
I get a big list of modules installed and
votingapi is included. If I run:
I get a
true response. I can also run:
And get a
true response. However if I run:
votingapi_cache tables don't show up in the list. So then when I try to write a record to those tables with
drupal_write_record() it doesn't work because that function checks the schema to see if the table exists. I have tried clearing the schema cache like this before I call
It doesn't help, when it is rebuilt from the API the voting tables never show up. If I go into Drupal's admin and Clear All Cache then the table schema is rebuilt correctly and includes the voting tables. Any ideas on how I can get the schema to rebuild correct for the API?