Closed (fixed)
Project:
Schema.org
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Jun 2011 at 03:15 UTC
Updated:
21 Jul 2013 at 03:44 UTC
Jump to comment: Most recent file
Comments
Comment #1
scor commentedNote I didn't use the JSON file straight from rdfs.schema.org as it was too heavy (> 300 KB) and contained a lot more data than what we needed for the use case of schemaorg.module (no need for all domain, range and superterms). It would be nice for rdfs.schema.org to offer some more lightweight version or a service to request only the data you need (e.g. id and comments).
Comment #2
sheldon rampton commentedI've created a separate module named "Schema.org cache" which retrieves and caches the full schema from http://schema.rdfs.org/all.json:
http://drupal.org/sandbox/sheldon/1867720
The attached patch to the Schema.org module will enable the Schema.org module to use this regularly-updated JSON source instead of the current hardcoded JSON file. I've wrapped the patch inside a module_exists() function so the Schema.org module will still work using the hardcoded file if the "Schema.org cache" module is not enabled.
Comment #3
sheldon rampton commentedComment #4
sheldon rampton commentedCan someone please review this patch so we can see about getting it committed?
I've released me Schema.org cache module as a full project on Drupal.org, but it's not very useful by itself unless the Schema.org module accepts this patch:
https://drupal.org/project/schemaorg_cache
Comment #5
scor commentedI don't see how this would work on a site located in a sub directory.
Also, this does not require to patch the schema.org module, the path to the schema.org terms can be altered via a hook_form_alter() that is run after schemaorg_ui form_alter implementation? (provided your module has a higher db weight than schema.org).
Comment #6
sheldon rampton commented@scor: Good point regarding a site located in a subdirectory.
Is there a means by which I can guarantee that my module has a higher db weight than schema.org upon installation?
Comment #7
scor commentedThere are different ways of doing this: https://drupal.org/node/110238.
Comment #8
sheldon rampton commented@scor: Thanks for the help. I've gone ahead and fixed the Schema.org cache module so it no longer needs this patch, so I'm closing this ticket.
FYI, here's the Schema.org cache module's ticket number where I documented the fix:
https://drupal.org/node/2046843