Problem/Motivation

In \Drupal\salesforce_pull\Controller\PullController::populateQueue (line 172), the parameter passed to loadByProperties is wrapped in double brackets / nested array, I think only one set of bracket is needed.

    else {
      $mappings = $this->mappingStorage->loadByProperties([["pull_standalone" => TRUE]]);
    }

--------------------------------------
p.s. This is my first post, so apologies if I am not doing this correctly. I looked through the existing issue queue, and cannot find one similar.

CommentFileSizeAuthor
salesforce_pull_controller.patch549 bytesEdith.F

Comments

Edith.F created an issue. See original summary.

  • AaronBauman committed 44a6086 on 5.0.x authored by Edith.F
    Issue #3232757 by Edith.F: Parameter nested in extra array when calling...
  • AaronBauman committed da93bdb on 8.x-4.x authored by Edith.F
    Issue #3232757 by Edith.F: Parameter nested in extra array when calling...
aaronbauman’s picture

Status: Active » Fixed

Great, thank you for filing the issue, definitely a bug.
I've committed it to the dev versions of both 5.0.x and 8.x-4.x
Congratulations on filing your first patch!

I hope I'm not over-stepping by offering a couple points of feedback so you can continue to file successful patches:

  1. When you post a patch, you will probably want to set the issue status to "Needs review"
    This will not only trigger any automated tests, but also bring the issue to maintainers attention
  2. Generally when writing a patch, you want to work against the latest dev version of the project, because that's where the patch will be applied. (5.0.x-dev for this module.) Lots of times it works out fine, but in some cases you might be working on out of date code.
  3. Your patch content is correct, but the file references are not.
    Where you have:
    --- /modules/contrib/salesforce/modules/salesforce_pull/src/Controller/PullController.php	2019-10-08 23:52:39.000000000 -0700
    +++ /modules/contrib/salesforce/modules/salesforce_pull/src/Controller/PullController.php	2019-10-08 23:52:22.000000000 -0700
    

    Should be:

    --- a/modules/salesforce_pull/src/Controller/PullController.php	2019-10-08 23:52:39.000000000 -0700
    +++ b/modules/salesforce_pull/src/Controller/PullController.php	2019-10-08 23:52:22.000000000 -0700
    

    I'm guessing this is because salesforce module is included in your site's repository, rather than a standalone clone of the module repo. Generally, you want to avoid editing patch files by hand, but it's relatively safe to edit the file paths.

Thanks again!

PS. if you haven't already, take a look at cweagans/composer-patches which will help you manage patches on your site.

Edith.F’s picture

Hi Aaron,

Your feedback is greatly appreciated!

It is a bit intimidating using the issue queue the first time around. So, thank you for taking the time to reply.

aaronbauman’s picture

You're welcome, no problem at all.
The patch system is very Drupal-specific and intimidating, I agree.

P.P.S If you're familiar with git and/or github, you may find it easier to use the Merge Request feature through gitlab, which works a bit like Pull Requests in github.

Status: Fixed » Closed (fixed)

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