Closed (fixed)
Project:
WURFL
Version:
7.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
15 Jan 2011 at 20:04 UTC
Updated:
20 Apr 2015 at 10:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
devildogmrk commentedI too am awaiting a Drupal 7 version of this module. Mobile Tools claims it has a D7 verson but does not seem to work without this module. So is there an expected date for a D7 version of this component?
Comment #2
Duck Whistle commentedsubscribed
This link may help. I'm going to give it a try.
http://fangel.github.com/mobile-detection-varnish-drupal/
Comment #3
danielm commentedsubscribe
Comment #4
tharpa.osang commentedsubscribe
Comment #5
mraichelson commentedsubscribe
Comment #6
Argus commentedsubscribe
Comment #7
hendrakieran commented+1
Comment #8
mgiffordHas anyone tried running this through the coder module? I haven't looked to see how big/complicated the code base is.
http://drupal.org/project/browscap & http://drupal.org/project/mobile_tools have a D7 versions.
Comment #9
johnalbinWURFL seems to be a really powerful tool.
If we can leverage the context this library provides, it will simplify Drupal's ability to provide performant experiences for all users on any device.
i.e. subscribe
Comment #10
chiebert commented+1 on the port to D7
Comment #11
rich.yumul commentedHere's an initial patch for a D7 version.
There wasn't too much to it other than fixing some theming issues and switching it to use drupal_set_message versus a theming layer callback.
I also added a check in the wurfl_boot() hook implementation to bump up the PHP's max_execution_time when it initially builds the cache.
HTH!
Rich
Comment #12
erynn commentedHere is the next patch. I ran this though coder and got most of the errors. The ones that are left are minor except in wurfl.admin.inc and they are about variables not being fully sanitized. Some of the minor errors I believe are being caused by a bug in coder (they deal with spacing issues).
I did these fixes after applying the patch above to the master git version.
Comment #13
erynn commentedHere is a better patch. My last one had a couple of mistakes as I got a bit too excited with coder and changed something I shouldn't have. Anyway, I have Wurfl up and running for a local install of D7. The Wurfl test page shows browser switching when I change my user agent to IPhone and my pages switch when I change the user agent using the firefox addon. Make sure you install the lastest WURFL api and have it installed properly or you will get an error stating that requesthttpdevice is calling on a non object and stuff along those lines.
Comment #14
johnalbinoh, you guys sneaked some patches into this queue. Awesome!
I should have posted this a bit earlier, but I didn't have any working code at the time.
I have a proposal to replace the existing WURFL API that this module uses with an updated API that was just relicensed to be GPL-compatible this week.
#1183246: Replace WURFL PHP API with database-edition WURFL API
If we went forward with that proposal, then I'd need to merge my work with the WURFL module and your patches. :-)
Comment #15
mgiffordI like the idea of the database version a lot! Hopefully that addresses some of the performance issues.
Comment #16
joekrukoskysubscribe
Comment #17
rich.yumul commentedVery cool. The way it makes it's own file-based hash always made me wonder about that. Ping me if I can help out.
Comment #18
johnalbinTom, the maintainer, has asked if I'd like to be co-maintainer of this module #1183246: Replace WURFL PHP API with database-edition WURFL API. I've haven't gotten the privileges yet, but assuming I do, here's the plan.
I'm interested in redoing the module using a different API and I'm not sure how long it will take me to complete. But I don't want to leave all of you in the lurch.
How about I work in the 7.x-2.x branch on my re-working of the API and we commit these patches to a new 7.x-1.x branch? That way you can get a D7 version of the module sooner without having to wait on me. Sound good?
In the mean time, I've committed the above patches to my sandbox: http://drupal.org/sandbox/johnalbin/1168218 I haven't tested the work though, so I can't confirm it works. :-)
Comment #19
johnalbinAs soon as drupal.org's packaging scripts finish running (they run every 12 hours), we'll have a shiny new 7.x-1.x-dev release of WURFL available.
Just to reiterate, I have NOT tested the release. I'm relying on everyone in this issue to test and provide patches for it. I won't be actively working on this branch, but I will gladly commit any work you contribute. :-)
Comment #20
mgiffordThanks John. So you'll be working on the 7.x-2.x-dev release that is all DB oriented, right?
Comment #21
gmak commentedI've just installed 7.x-1.x-dev and it is throwing PHP syntax errors on lines 21, 41 and 46 (or thereabout).
These are all related to
drupal_set_messagecommands like:drupal_set_message( t('The WURFL configuration file (wurfl-config.xml) cannot be found in !library/resources. Read the INSTALL.txt file for instructions.', array('!library' => $library), 'error');If you count the open and close parentheses in the above you'll see that there are 3 'open', but only 2 'closed'. So, I thought that adding a 'closed' parenthesis would do the trick, but that's not it (or it goes somewhere I'm missing).
The only way I could see to get things working was to use:
drupal_set_message( t('The WURFL configuration file (wurfl-config.xml) cannot be found in $library/resources. Read the INSTALL.txt file for instructions.'), 'error');Comment #22
gmak commentedActually, it does work to add the ")" to the end. I missed one. So, the lines should be:
line 21:
drupal_set_message(t('The WURFL library is successfully installed in !library', array('!library' => $library)));line 41:
drupal_set_message( t('The WURFL configuration file (wurfl-config.xml) cannot be found in !library/resources. Read the INSTALL.txt file for instructions.', array('!library' => $library), 'error'));line 45:
drupal_set_message(t('The WURFL library is successfully installed in !library/resources/wurfl-config.xml', array('!library' => $library)));I think that's all of them.
Comment #23
rwohlebsubscribe
Comment #24
rwohlebI'm not seeing a D7 dev build. Are people just pulling from the git branch for testing at the moment?
Comment #25
spacereactor commented#24 see http://drupal.org/node/432696/release there is wurfl 7.x-2.x-dev
Comment #26
johnalbinI've updated the project page so that it includes the 7.x-1.x-dev release in the downloads list.
I've also committed gmak's changes in #22. So, hopefully, no more PHP parse errors when the 7.x-1.x-dev is re-rolled sometime in the next 12 hours.
Comment #27
johnalbinDon't use the 7.x-2.x-dev branch! It's doesn't work yet.
Comment #28
Argus commentedComment #30
lucor commentedThe version 7.x-3.0-alpha1 has been released.