Problem/Motivation

Test submit form is submitting the form values incorrectly to the firebase api service.

Steps to reproduce

Get FCM token that is valid.
Create test notification on test form and submit.
Will return error.

Proposed resolution

Update

$this->messagingService->sendMessageSingleDevice(
        $form_state->getValue('title'),
        $form_state->getValue('message'),
        $form_state->getValue('device_token'),
        NULL,
        NULL,
        NULL,
        intval($form_state->getValue('badge_count')),
);

to

$this->messagingService->sendMessageSingleDevice(
        $form_state->getValue('device_token'),
        $form_state->getValue('title'),
        $form_state->getValue('message'),
        NULL,
        NULL,
        NULL,
        intval($form_state->getValue('badge_count')),
);

Remaining tasks

Update code as above.

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

GeorgeBC created an issue. See original summary.

ptmkenny made their first commit to this issue’s fork.

ptmkenny’s picture

  • ptmkenny committed f2a811d9 on 7.0.x
    Issue #3466273 by ptmkenny, GeorgeBC: Test form submitting incorrect...
ptmkenny’s picture

Status: Active » Fixed

Thanks for reporting this. You're absolutely right; the arguments got switched around.

Status: Fixed » Closed (fixed)

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

webflo’s picture

Can we get a new release for the project? It has caused me a lot of problems when using the module. Unfortunately, everything was configured correctly, only the test mode was broken.

Great module! Thanks @ptmkenny

ptmkenny’s picture

@webflo Done, and sorry about that. I had intended to do another release after fixing the bug and I got sidetracked.