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

Fixes 500 error in forms when render style is deactivated against 4.1 #10697

Merged
merged 2 commits into from Dec 20, 2021

Conversation

escopecz
Copy link
Sponsor Member

@escopecz escopecz commented Dec 20, 2021

Same as #10673 but we need to get it to the 4.1 branch too.

@cla-bot cla-bot bot added the cla-signed The PR contributors have signed the contributors agreement label Dec 20, 2021
@codecov
Copy link

codecov bot commented Dec 20, 2021

Codecov Report

Merging #10697 (2777424) into 4.1 (5975231) will increase coverage by 0.15%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                4.1   #10697      +/-   ##
============================================
+ Coverage     44.23%   44.39%   +0.15%     
  Complexity    34806    34806              
============================================
  Files          2080     2080              
  Lines        116691   116691              
============================================
+ Hits          51615    51801     +186     
+ Misses        65076    64890     -186     
Impacted Files Coverage Δ
app/bundles/FormBundle/Form/Type/FormType.php 97.26% <ø> (ø)
.../bundles/CoreBundle/Helper/Chart/AbstractChart.php 73.52% <0.00%> (-1.48%) ⬇️
app/bundles/FormBundle/Model/FormModel.php 71.08% <0.00%> (+1.30%) ⬆️
...ndles/CoreBundle/Templating/Helper/SlotsHelper.php 28.57% <0.00%> (+9.52%) ⬆️
app/bundles/FormBundle/Entity/Field.php 87.72% <0.00%> (+13.71%) ⬆️
...p/bundles/FormBundle/Controller/FormController.php 41.12% <0.00%> (+24.06%) ⬆️

@escopecz escopecz merged commit 43d17d9 into mautic:4.1 Dec 20, 2021
RCheesley pushed a commit that referenced this pull request Dec 20, 2021
* Update language string (#10684)

The button that i updated is for saving changes made in the "Edit code" window and should thus say "Save", not "Edit".

* Fixes 500 error in forms when render style is deactivated against 4.1 (#10697)

* Fixes issue #10453

* Adding functional test covering the bug

#10453

Co-authored-by: Rolando <rpayanm@gmail.com>

* Fixing issues when using PHPSTAN with more processes (#10696)

* Bumping to version 4.1.1

Co-authored-by: Kathrin Schmid <96054002+kathrin-schmid@users.noreply.github.com>
Co-authored-by: Rolando <rpayanm@gmail.com>
RCheesley added a commit that referenced this pull request Jan 27, 2022
* Update language string (#10684)

The button that i updated is for saving changes made in the "Edit code" window and should thus say "Save", not "Edit".

* Fixes 500 error in forms when render style is deactivated against 4.1 (#10697)

* Fixes issue #10453

* Adding functional test covering the bug

#10453

Co-authored-by: Rolando <rpayanm@gmail.com>

* Fixing issues when using PHPSTAN with more processes (#10696)

* Bumping to version 4.1.1

* Remove reference to mautibox (#10681)

* Fix lock wait deleting unused ips (#10710)

* Deleted unused IPs in batches and some improvements.

* Added return type declaration to command methods and some improvements.

* Removed dump()

* Created separate methods for get and delete unused ips.

* Consumed repo methods in model.

* Updated command to use model methods.

* Added test case.

* Fix static analysis

* Fix contact batch api for single id value (#10700)

Co-authored-by: John Linhart <admin@escope.cz>

* fix(LeadTimelineEvent): keys do not match the func args, strips keys (#10663)

Fix error when using PHP 8:
{"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): array_merge() does not accept unknown named parameters}

Not sure if this is the most elegant way to address the issue but this bug has broken the site functionality.

* User update role api (#10668)

* Allow user to update role via API

* Update user's role using API: test cases

* Update user's role using API: added more test cases

* Fix test cases and add more test case

* Added AbstractMauticTestCase::loginUser() method that allows login user in non-restricted areas

* Fix failing tests

Co-authored-by: fedys <miroslav.fedeles@gmail.com>
Co-authored-by: John Linhart <admin@escope.cz>

* Fix send unpublished SMS (#10577)

* Fix send unpublished SMS

* Fix send unpublished SMS for broadcast command

* Add CampaignSendSubscriberTest

* Add testSendSmsNotPublished test

* Minor change to tests

* Fixing types

* Automatic cs fix

Co-authored-by: John Linhart <admin@escope.cz>

* Fix group by If you use count columns for assets download (#10693)

* Fix group by If you use count columns

* Add unit tests

* Fix unit tests

* Remove define from tests

* Fix unit tests

* Fix unit tests

* Fix unit tests

Co-authored-by: John Linhart <admin@escope.cz>

* Update grapesjs-custom.css (#10728)

Removing the background color f0f0f0 from gjs-field-radio class to improve the color constrast between radio's background and radio's options and returning the class parameters to the default of the original editor.

Co-authored-by: Ruth Cheesley <ruth.cheesley@acquia.com>

* Update stale.yml (#10746)

Apply Stalebot only to issues and not PRs

Co-authored-by: John Linhart <admin@escope.cz>

* Fixed variable name (#10753)

Co-authored-by: Ruth Cheesley <ruth.cheesley@acquia.com>
Co-authored-by: Joey Keller <jos0405@gmail.com>

* Change field definition for column_value to longtext instead of varchar (#10778)

* Change field definition for column_value to longtext instead of varchar 255

* Update app/migrations/Version20200729170800.php

Co-authored-by: John Linhart <admin@escope.cz>

* I suggested bad namespace path during code review. Fixing it here

Co-authored-by: Don Gilbert <don@dongilbert.net>

* Correct bug no forms in the select contact source campaign when the forms have identical names (#10717)

* Correct name form Campaign Contact Source

* Refactoring and add test

* Finishing up the test

* Fixing the bug discovered by the test

* CS fix

Co-authored-by: John Linhart <admin@escope.cz>
Co-authored-by: Ruth Cheesley <ruth.cheesley@acquia.com>

* Restore X value in contact boolean fields (#10716)

* Fix empty value in contact boolean fields

* Fix configuration page save

* Fix controller functional tests

* Always retype the isEnabled param to int. Even for PATCH

* Fixing phpstan issue

  Line   app/bundles/ChannelBundle/Controller/Api/MessageApiController.php
 ------ -------------------------------------------------------------------
  32     Property
         Mautic\ChannelBundle\Controller\Api\MessageApiController::$model
         (Mautic\ChannelBundle\Model\MessageModel) does not accept
         Mautic\CoreBundle\Model\AbstractCommonModel.

* Fixing PHP Notice - Undefined index: email

"file":"\/var\/www\/html\/mautic\/app\/bundles\/ChannelBundle\/Controller\/Api\/MessageApiController.php","line":54

I cannot figure out why the condition for PATCH was there in the first place. It's causing only troubles.

* Adding functional API tests covering the problematic endpoint and method, fixing the controller

* Fix csfixer issue

* Adding missing description to payloads for assertion

Co-authored-by: John Linhart <admin@escope.cz>
Co-authored-by: Ruth Cheesley <ruth.cheesley@acquia.com>

* Add missing information (#10656)

* Add missing information

* Missing commas 😊

* Fix for pushing to integrations in campaign actions (#10674)

* Fix for #10517

Some integrations such as Hubspot have an `'encode_parameters' => 'json'` setting, which triggers the parameters being sent in `POST` / `PUT` / `PATCH` requests to be `json_encode`-d: https://github.com/mautic/mautic/blob/5975231722cfde8bdad783b373c70ad20333db37/app/bundles/PluginBundle/Integration/AbstractIntegration.php#L760

That causes a problem when the result is passed to Guzzle's `request` method under key `\GuzzleHttp\RequestOptions::FORM_PARAMS`, because the payload is expected to be an array: https://github.com/mautic/mautic/blob/5975231722cfde8bdad783b373c70ad20333db37/app/bundles/PluginBundle/Integration/AbstractIntegration.php#L829 as per the documentation: https://docs.guzzlephp.org/en/stable/request-options.html#form-params

The above RP addresses this by passing the payload under `\GuzzleHttp\RequestOptions::BODY` instead, **if** the payload is a string, rather than an array.

Tested and working with HubSpot.

* Adding test to the payload key fix

* Creating Client in another method so it could be mocked

Plus some code style improvements

* CS Fixer

* STAN fixes

* Removing whitespace

Co-authored-by: John Linhart <admin@escope.cz>
Co-authored-by: Ruth Cheesley <ruth.cheesley@acquia.com>

* Bump to 4.1.2

Co-authored-by: Kathrin Schmid <96054002+kathrin-schmid@users.noreply.github.com>
Co-authored-by: John Linhart <admin@escope.cz>
Co-authored-by: Rolando <rpayanm@gmail.com>
Co-authored-by: Tejas Navghane <ts.navghane@gmail.com>
Co-authored-by: Rahul Dhande <68939488+rahuld-dev@users.noreply.github.com>
Co-authored-by: Anthony Bailey <65302481+abailey-dev@users.noreply.github.com>
Co-authored-by: fedys <miroslav.fedeles@gmail.com>
Co-authored-by: Zdeno Kuzmany <zdeno@kuzmany.biz>
Co-authored-by: Eloi Marques da Silva <eloimarquessilva@gmail.com>
Co-authored-by: mollux <mattias.michaux@gmail.com>
Co-authored-by: Joey Keller <jos0405@gmail.com>
Co-authored-by: Don Gilbert <don@dongilbert.net>
Co-authored-by: Tomasz Kowalczyk <39382654+tomekkowalczyk@users.noreply.github.com>
Co-authored-by: Patryk Gruszka <patryk.gruszka@comarch.pl>
Co-authored-by: Tony Bogdanov <tonybogdanov@gmail.com>
shinde-rahul pushed a commit to shinde-rahul/mautic that referenced this pull request Feb 2, 2022
* Update language string (mautic#10684)

The button that i updated is for saving changes made in the "Edit code" window and should thus say "Save", not "Edit".

* Fixes 500 error in forms when render style is deactivated against 4.1 (mautic#10697)

* Fixes issue mautic#10453

* Adding functional test covering the bug

mautic#10453

Co-authored-by: Rolando <rpayanm@gmail.com>

* Fixing issues when using PHPSTAN with more processes (mautic#10696)

* Bumping to version 4.1.1

Co-authored-by: Kathrin Schmid <96054002+kathrin-schmid@users.noreply.github.com>
Co-authored-by: Rolando <rpayanm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The PR contributors have signed the contributors agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants