A wide range of fatal errors/uncaught exceptions seem to be being caused because the API has changed. As per some of the other issues on here and also http://tech.groups.yahoo.com/group/wmlprogramming/message/32236 the answer appears to be to use WURFLManagerFactory instead of WURFLManagerProvider. Don't ask me what that really means but I have been able to get the module working with the new API.
It has also been possible to create functions which utilise other aspects of the API, namely getListOfGroups and getCapabilitiesNameForGroup, resulting in the functions wurfl_get_groups() (which returns an array of all the group ids) and wurfl_get_capabilities() (which returns an array (indexed by the group ids) of arrays of capability ids for each group).
A patch is attached. This incorporates changes suggested by notjosh in the patch at comment #2 of #748434: Fatal error: Call to a member function save() on a non-object in C:\xampp\htdocs\mobile\sites\all\modules\wurfl\lib\wurfl\WURFL.
I would suggest that the configuration page allows the admin to specify where the WURFL data is located. The module currently expects it to be in a directory called lib within the module's directory, but I didn't see that documented anywhere. Is it worth making that a configurable thing, or should the documentation just be improved?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | wurfl-new-api-3.patch | 9.85 KB | martin_q |
| #3 | wurfl-new-api-3.patch | 9.86 KB | martin_q |
| #2 | wurfl-new-api-2.patch | 9.85 KB | martin_q |
| #1 | wurfl-new-api.patch | 3.53 KB | martin_q |
Comments
Comment #1
martin_qPatch attached
Comment #2
martin_qFurther patch incorporating changes needed for #766904: WURFL module must be bootstrapped and a configuration page as suggested above.
Comment #3
martin_qArrgh - schoolboy error in that last file. Now corrected.
Comment #4
martin_qTo apply that patch you need to change the filename given in the first line. Final (hopefully) change to this patch now included below.