Problem/Motivation

Facebook Graph API version has released the latest version of 10.0 which is not accepted in the configuration because of form validation.

Steps to reproduce

After enabling the module , while trying to set the configuration set the version as v10.0 , it throughs the error.

Proposed resolution

Fix the facebook form validation criteria , which allows only 2-9 as major release , change it to allow 10 also.

Comments

Anjali Rathod created an issue. See original summary.

anjali rathod’s picture

Status: Active » Needs review
StatusFileSize
new746 bytes

The solution proposed by me is in the patch , please review and add comments

Status: Needs review » Needs work

The last submitted patch, 2: updated-regex-3201530-2.patch, failed testing. View results

wells’s picture

Thank you for contributing! The regex change is slightly off — the first group [1-9] need to be optional so that e.g both “9.0” and “10.0” are supported.

It would be nice to have a test for this as well but I wouldn’t hold up a merge on this without it.

anjali rathod’s picture

Assigned: Unassigned » anjali rathod

Ok. will create a new patch for it.

anjali rathod’s picture

Assigned: anjali rathod » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.18 KB
wells’s picture

Status: Needs review » Needs work

@Anjali -- thanks for the update. We can simplify this further. Lets just change the existing regex to ^([2-9]|[1-9][0-9])\.[0-9]{1,2}$. That will match all of the supported versions with a single preg_match instead of breaking this is up in to multiple conditionals and match operations.

anjali rathod’s picture

Assigned: Unassigned » anjali rathod

Okay. Thanks for the help. will create a patch for the same

anjali rathod’s picture

Assigned: anjali rathod » Unassigned
Status: Needs work » Needs review
StatusFileSize
new754 bytes
ranjan.daswani’s picture

Yes, #9 patch accept v10.0, and work well for me, thanks

  • wells committed 1059405 on 3.x authored by Anjali Rathod
    Issue #3201530 by Anjali Rathod: Facebook Graph API version v10.0 is not...
wells’s picture

Status: Needs review » Fixed

Thanks, @Anjali Rathod! This is committed now.

Status: Fixed » Closed (fixed)

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