'Edit A Person' form is not provided in systems where curl is not installed

Bug #1172272 reported by Nadeeshani Hewage
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Vesuvius
Fix Released
High
Kaushika Rukshan Athukorala

Bug Description

EAP module's 'Edit A Person' form is not provided in systems where curl is not installed. Does not produce an error/warning to gracefully handle. Just stops the form visibility to the user.

Tags: defect
tags: added: defect
Revision history for this message
Ramindu Deshapriya (rasade88) wrote :

Can confirm: EAP does not work on systems where CURL is not installed.

Changed in vesuvius:
importance: Undecided → High
status: New → Confirmed
Changed in vesuvius:
status: Confirmed → In Progress
status: In Progress → Confirmed
Revision history for this message
Kaushika Rukshan Athukorala (kaushikaruk) wrote :

In eap/main.inc, it creates an object of goo_gl class to create a short URL. In the constructor it calls curl_init() so curl should be pre installed. In the Fix I added a condition to check whether curl is installed or not.

Here I attached two patches for two solutions.

Bug_1172272_1.patch - Giving ability to edit the person record but short url will not be shown.
Bug_1172272_2.patch - Giving an error message informing user to install curl to proceed.

Revision history for this message
Kaushika Rukshan Athukorala (kaushikaruk) wrote :

PFA Bug_1172272_2.patch - Giving an error message informing user to install curl to proceed.

Revision history for this message
Ramindu Deshapriya (rasade88) wrote :

Hi Rukshan,

I have applied the first patch. But would like to see a hybrid, with a warning being displayed if CURL is not installed, but the module workflow proceeding forward anyway.

Changed in vesuvius:
status: Confirmed → Fix Committed
Changed in vesuvius:
assignee: nobody → Kaushika Rukshan Athukorala (kaushikaruk)
Revision history for this message
Akila Ravihansa Perera (ravihansa3000) wrote :

Added a function to check whether 'curl' is present in the existing php configuration: _is_curl_installed()
Separate function might come in handy since there are many instances of curl_init calls.
Used add_error function to display the error message and gracefully handle the exception.

Revision history for this message
Akila Ravihansa Perera (ravihansa3000) wrote :

Implementation of function _is_curl_installed()

Revision history for this message
Kaushika Rukshan Athukorala (kaushikaruk) wrote :

Here is the patch for hybrid solution. I revert the changes of the 1st patch and created a new one.

Revision history for this message
Ramindu Deshapriya (rasade88) wrote :

Committed Kaushika's fix, thanks.

Changed in vesuvius:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers