This module integrates the Outdated Browser library in Drupal. It detects outdated browsers and advises users to upgrade to a new version - in a very pretty looking way.

The library ships with various languages. Its look and feel is configurable, and the targeting browser can be configured either specifying a CSS property or an Internet Explorer version.

Motivation

In the past, we've always used a "browse happy" bar on top of the page, simply embedded with conditional comments for IE lower or equal than version 8. But that's was not very pretty looking, also not multilingual. There several initivatives and scripts available, like browser-update.org, which also already has a Drupal integration, but most of them are pretty ugly.

These days we've found the Outdated Browser library on Github, where both the updated prompt on the website, as well as the platform itself have a very nice look and feel. It also ships with a broad variety of language files, which makes this script perfectly suitable for any multilingual Drupal project.

Project page

https://www.drupal.org/sandbox/agoradesign/2369737

GIT

git clone --branch 7.x-1.x git.drupal.org:sandbox/agoradesign/2369737.git outdatedbrowser

Manual reviews of other projects

CommentFileSizeAuthor
#15 2015-01-05 02.59.30 pm.png99.89 KBmouhammed

Comments

agoradesign’s picture

Issue summary: View changes
Status: Active » Needs review
agoradesign’s picture

Issue summary: View changes
PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

oss-usa.com’s picture

Errors in the code not found.

Tested in ie8, ie9, opera 12.0 there were no reports that the browser is outdated.

agoradesign’s picture

Did you check the status report (admin/reports/status), if the library was found correctly?

What is your setting for "Outdated Browser message: targeting browser" (admin/config/services/outdatedbrowser)?

jami’s picture

Category: Task » Bug report
Status: Needs review » Needs work

I like the start on feature detection (I'd love to be able to add a few different requirements there), which seems different enough from the other browser detectors I'm aware of.

I also didn't see any code problems, no license issues, and the documentation looks good.

It went through Coder with no warnings.

But like oss-usa.com, I'm also not getting a message to update when I switch my (Chrome) user agent to Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US), with the setting at either "8" or "transform". The status page shows that I have version 1.1.0 of the outdatedbrowser library available.

That is the only thing that I'd say should be resolved for sure before I'd move forward.

Two other (non-blocking) suggestions:
1. The library has a hyphen in the parent folder name. I missed that for a while, so I'd either emphasize it in the documentation or change it in the code.
2. Some sort of test for the library/reminder to add it could be helpful.

This module will be very helpful! Thank you for contributing!

agoradesign’s picture

Hi jami,
first of all thank you very much for your detailled review!

Regarding your tests regarding functionality:

1. I'm not familiar with switching the user agent within Chrome, so I don't know, if that's really a good way to simulate older browsers. Just tried it, and for me even Modernizr tells me, that csstransforms are supported, when I switched the user agent to IE7!!! So it seems, that here really only the user agent in the HTTP header is modified, nothing else. Therefore I would recommend to test with Internet Explorer, using the Developer Tools (press F12 on your keyboard).
2. Just for the case, that the feature detection does not work correctly under any circumstances (e.g. with an very old Firefox or Opera), please remind, that you are testing here a module, that integrates the library into Drupal, not the library itself. So if you find any bugs, that are present in the library itself, please file a bug report in the Github repository of the library.

Regarding the parent folder name: you're absolutely right! I also struggled with the naming inconsistency of the library itself. The outer directory has got a hyphen, the directory inside and other parts don't. So I first wanted to leave the outer hypen, but that would bring inconsistency to the library definition inside Drupal. From other libraries I'm already used to rename the parent directory - e.g. colorbox comes with "colorbox-master", etc. But it's a good point to clarify that in the readme file!

agoradesign’s picture

Status: Needs work » Needs review

aaaargh! I've forgot to reset the status to "needs review"... I was already wondering why nobody does a review for such a long time...

However, I've updated the README file and clarified to pay special attention to the directory name.

rahulbaisanemca’s picture

Issue summary: View changes

Hi agoradesign,
hook_help() is not available in your module.

Thanks,
Rahul.

PA robot’s picture

Status: Needs review » Needs work

Git clone command for the sandbox is missing in the issue summary, please add it.

I'm a robot and this is an automated message from Project Applications Scraper.

klausi’s picture

Issue summary: View changes
Status: Needs work » Needs review
agoradesign’s picture

@Rahul: added hook_help() implementation.

rahulbaisanemca’s picture

Thanks for adding a hook_help().

rahulbaisanemca’s picture

1) i have downloaded a outdated-browser-develop.zip from https://github.com/burocratik/outdated-browser/archive/develop.zip and place a outdatedbrowser.js file in /sites/all/libraries/outdatedbrowser/outdatedbrowser/outdatedbrowser.js

2) jquery update module is set at 1.7.

3) current using browser Chromium Version 37.0.2062.94 Ubuntu 14.04 (290621) still i am getting error on in console
Uncaught ReferenceError: outdatedBrowser is not defined outdatedbrowser.js:9
Failed to load resource: net::ERR_FAILED chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js
Failed to load resource: net::ERR_FAILED chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/cast_sender.js
Failed to load resource: net::ERR_FAILED chrome-extension://hfaagokkkhdbgiakmmlclaapfelnkoah/cast_sender.js
Failed to load resource: net::ERR_FAILED chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/cast_sender.js
Failed to load resource: net::ERR_FAILED chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js
4) also,tried on Mozilla firefox for ubuntu canonical - 1.0 still get error
ReferenceError: outdatedBrowser is not defined
outdate...?nhokzg (line 9, col 4)
Use of getPreventDefault() is deprecated. Use defaultPrevented instead.
jquery-....min.js (line 3)

Please correct me if i am doing anything wrong.
Thanks,
Rahul.

mouhammed’s picture

StatusFileSize
new99.89 KB
  1. outdatedbrowser_page_build(&$page): you should'nt use drupal_add_js() here, use #attached with the $page render array that this function should receive. See https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.h...
  2. outdatedbrowser_requirements : you need to check if libraries is installed and libraries_detect exist before calling it.
    <?php if (module_exists('libraries') && function_exists('libraries_detect')) { }?>
  3. I've installed the module without the outdated library and it break all javascript of my Drupal site. If the library is not installed, your module should'nt call it. See screenshot
agoradesign’s picture

Hi mouhammed,
thanks for your review!

@2: My module has a dependency on libraries, so it's impossible that outdatedbrowser is installed without libraries

I've created issues for the other two things - will have a look at these asap

agoradesign’s picture

@rahul: it seems, the library cannot be found. Have you only placed the outdatedbrowser.js in the directory? You should copy the full library instead. By default, the min.js file is used (you can configure that in the Drupal administration). And you need CSS files as well as translation files,..

valentine94’s picture

Status: Needs review » Needs work

I've set a "Need work" status until #15 bugs will be fixed.

agoradesign’s picture

Status: Needs work » Needs review

fixed :)

valentine94’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, looks good - RTBC

agoradesign’s picture

Issue summary: View changes
agoradesign’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
klausi’s picture

Status: Reviewed & tested by the community » Fixed

manual review:

  • outdatedbrowser_help(): filter_xss_admin() and check_plain() are wrong here, since no user provided text is involved. The contents of README.txt are provided by you, the developer, so you can trust what is in there. Make sure to read https://www.drupal.org/node/28984 again. Looks like this now fixed on the doc page, too: https://www.drupal.org/node/161085

But otherwise looks good to me, so ...

Thanks for your contribution, agoradesign!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

agoradesign’s picture

Thank you very much klausi! And of course a big thank to all reviewers! :-)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.