Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to Gift Aid batch gives error #73

Open
michael-chaplin-gmcvo opened this issue Feb 28, 2019 · 12 comments
Open

Add to Gift Aid batch gives error #73

michael-chaplin-gmcvo opened this issue Feb 28, 2019 · 12 comments

Comments

@michael-chaplin-gmcvo
Copy link

michael-chaplin-gmcvo commented Feb 28, 2019

Using 3.0.2 plus patch for version number (https://github.com/compucorp/uk.co.compucorp.civicrm.giftaid/pull/68/files)
and PHP 7.1.

ParseError: syntax error, unexpected 'new' (T_NEW) in CRM_Civigiftaid_Form_Task_AddToBatch->preProcess() (line 99 of /home/gmcvodataba/public_html/sites/default/files/civicrm/extensions/uk.co.compucorp.civicrm.giftaid-civi4.5/CRM/Civigiftaid/Utils/Contribution.php).

Also get this error when trying to run a Gift Aid Submission Report.

@davejenx
Copy link

davejenx commented Mar 1, 2019

Looks like it needs '=& new' changed to '= new' at CRM/Civigiftaid/Utils/Contribution.php line 99 plus other occurrences in that file.
http://php.net/manual/en/migration70.incompatible.php

@davejenx
Copy link

davejenx commented Mar 1, 2019

Created PR: #74 .

@michael-chaplin-gmcvo
Copy link
Author

I did start down that road but there were numerous instances of the '=&' problem and once I'd fixed those, there were issues in other files too.

@davejenx
Copy link

davejenx commented Mar 1, 2019

@mikantchap Could you apply #74 then report here the further error messages you get?

@michael-chaplin-gmcvo
Copy link
Author

Is that patch wrong? Its adding the & back in on 99?

//$batchContribution =& new CRM_Core_DAO_EntityBatch( );
$batchContribution =& new CRM_Batch_DAO_EntityBatch();

@davejenx
Copy link

davejenx commented Mar 1, 2019

@michael-chaplin-gmcvo
Copy link
Author

Sorry yes. Here's the next error:

ArgumentCountError: Too few arguments to function CRM_Utils_Hook::invoke(), 7 passed in /home/gmcvodataba/public_html/sites/default/files/civicrm/extensions/uk.co.compucorp.civicrm.giftaid-civi4.5/CRM/Civigiftaid/Utils/Hook.php on line 118 and exactly 8 expected in CRM_Utils_Hook->invoke() (line 154 of /home/gmcvodataba/public_html/sites/all/modules/civicrm/CRM/Utils/Hook.php).

@davejenx
Copy link

davejenx commented Mar 1, 2019

@mikantchap That's the error you reported at #72 , which I believe is not specific to PHP 7. @vinuvarshith indicated that another PR, #68 fixes issues #71 & #72 .

@michael-chaplin-gmcvo
Copy link
Author

Hey thanks...looks like its fixed!

@davejenx
Copy link

davejenx commented Mar 1, 2019

@mikantchap Could you clarify, from your last two comments, what is now fixed and what is still broken, after applying patches #68 and #74, when you do the following operations:

  • Add to Gift Aid batch (this issue)
  • On submitting a test/live payment from a contribution page (issue Error with CiviCRM 5.10.3 #72): best to update that issue so people can understand the status of the issue.

@michael-chaplin-gmcvo
Copy link
Author

After applying patches #68 and #74, I am able to Add to Gift Aid batch.

@michael-chaplin-gmcvo
Copy link
Author

Hi Can you say when the fix will go in a release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants