After running osmobi successfully for at least one month, suddenly this error message pops up on a D6 website which runs on a VPS.
Notice: Undefined index: HTTP_USER_AGENT in /var/www/vhosts/xxxxxx/httpdocs/sites/all/modules/osmobiclient/osmobiclient.module on line 424
The solution was to upgrade the module (I upgraded the theme to be certain as well) to the latest version and the problem was gone. Is it best practice now that I go to the osmobi online interface and check how the website looks on mobile?
One thing I find rather strange: the error message was printed to the website, even though the error message handling says only to print to the log. Therefore, I presume this error pops up before Drupal is completely loaded.
Comments
Comment #1
toemaz commentedI'm putting it back to active bc even after upgrading the theme & module, this warning pops up again.
Comment #2
twom commentedToemaz,
Thx for the report!
We currently don't check the presence of the $_SERVER['user_agent'] variable, so an error .I'll change this and commit to the dev release. Together with some other updates we will do an officially new release around christmas.
Can you tell me if this happens with a specific browser? The thing we have to figure out is why the user_agent variable did not exist... This is essential to the module in order to redirect!
Thanks for the feedback ;)
Twom
Comment #3
twom commentedI have committed to the dev a new version.
When the user_agent string is not defined, we currently assume that it is a browser (and don't redirect). This is the safe way, till we understand better why the string is undefined.
Twom
Comment #4
toemaz commentedIt's hard to tell which browser it is. It happens for the cached (anonymous) pages only and I can't know which browser pushed the cache. So when I'm logged in with Chrome, FF I can't see the error. I have a slight feeling it could be Safari on Mac OS.
Comment #5
toemaz commentedCould you make the dev release available for download? This way I can test your changes. Thanks!
Comment #6
twom commentedVoila, snapshot is published now!
Comment #7
twom commentedClosing this issue. This is fixed!
Tom