@diosmosis opened this Issue on December 3rd 2018 Member

See https://travis-ci.org/matomo-org/matomo/jobs/462646517

Many files like /vendor/endroid/qrcode/assets/data/qrv36_2.dat are added. Not sure if they are needed for qr code generation or not.

CC @mattab / @tsteur

@tsteur commented on December 4th 2018 Member

I've quickly checked in the code and it looks like this code is needed :( might be wrong though. only alternative would be to maybe use another lib. I've simply reused what @sgiehl used for Google Authenticator.

@Findus23 commented on December 4th 2018 Member

@tsteur Is there any reason to use 1.9 instead of the latest 3.5.0? I can't find the assets/data files anymore in the latest version:

Okay this is a reason:
so -> #13611

@sgiehl commented on December 4th 2018 Member

Version 2.0 already didn't contain those files anymore. But that requires PHP 5.6. Might be worth to check if that version works with PHP 5.5 as well. Or maybe it's an option to mark the 2FA plugin as compatible with PHP 5.6 or 7 only. So users with older PHP versions can't use it

@tsteur commented on December 20th 2018 Member

Marking it as PHP 5.6 plus could be an idea. Actually never tried if we can require PHP version for a core plugin.

@tsteur commented on December 20th 2018 Member

Just added this plugin.json

  "require": {
    "php": ">=7.2.0"

as a test and it worked. However, then this error notification constantly appears which would be a bit annoying:

The plugin TwoFactorAuth could not be loaded as it has missing dependencies: TwoFactorAuth requires Php >=7.2.0. Please contact your Matomo administrator.

Looked for couple other QR Code libraries but looks like they either support 5.6+ or have those dat files. Also looked for some JavaScript alternatives... maybe https://davidshimjs.github.io/qrcodejs/ (https://github.com/davidshimjs/qrcodejs) would be a good solution?

@tsteur commented on December 20th 2018 Member

tested https://github.com/davidshimjs/qrcodejs but seems to print canvas and image etc.... Might try another JS lib

@tsteur commented on December 20th 2018 Member

also tried https://github.com/jeromeetienne/jquery-qrcode but doesn't work well either. Example in readme has typos, and the number of open issues and PRs is big. Also hasn't had a change in years. So not quite surprised it isn't working.

@tsteur commented on December 20th 2018 Member

Got it to work with https://github.com/davidshimjs/qrcodejs after all

This Issue was closed on December 21st 2018
Powered by GitHub Issue Mirror