Skip to content

Conversation

david-gap
Copy link
Contributor

@david-gap david-gap commented Aug 8, 2024

Q A
Bug fix? (use the a.b branch) ✔️
New feature/enhancement? (use the a.x branch)
Deprecations?
BC breaks? (use the c.x branch)
Automated tests included?
Related user documentation PR URL mautic/user-documentation#...
Related developer documentation PR URL mautic/developer-documentation-new#...
Issue(s) addressed Fixes issue: #13542

Description

After Updating Mautic from 4.4.11 to 5.0.2 there is an issue with the form fields checkbox, radio and select.
If the input field is mapped with a contact/company field and custom properties are defined, the assigned contact/company fields list choices are loading.

Custom properties
image

Output
image

How can we reproduce this issue?

Step 1: Create a form
Step 2: Add field type radio
Step 3: Connect field with the contact title field
Step 4: Define custom properties
Step 5: See form output

With this PR, the issue should be resolved and the form fields should work properly.


📋 Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. Open the PR and click the green ‘Gitpod’ button to launch the environment with the PR applied. Alternatively, manually check out the PR branch in your local setup.
  3. Create or identify a Mautic entity, such as a Contact, that has custom properties. Perform actions that trigger the loading of these properties and ensure they are displayed correctly without errors.
  4. Report findings.

RCheesley and others added 8 commits June 18, 2024 12:57
* Improve grammar for unhide

* Fix test
Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>
* [UI] Replaces table action button `arrow-down` with `more-2` icon (mautic#13841)

* [UI] Replaces table action button `arrow-down` with `more-2` icon

This replaces the icon for the action toggle button in tables (e.g. contact list table or segment list table) with a 3 dot icon.

The previous arrow down icon indicates that an collapsed element would get unfolded/shown. This is not the case in these tables. The button shows more actions. In any UI that I know a 3 dot icon is used for that.

The arrow down icon would be more suitable if it would show more details on click. Hence, this PR.

* TASK: Reverts change for `page_actions.html.twig`

Co-authored-by: Anderson, from Dropsolid <116097999+andersonjeccel@users.noreply.github.com>

---------

Co-authored-by: Anderson, from Dropsolid <116097999+andersonjeccel@users.noreply.github.com>

* add js code to hide profile pic if missing (mautic#13838)

* Segment membership as a new filter for dynamic email content (mautic#13528)

* Merge pull request mautic#1088 from mautic-inc/MAUT-4688

Maut 4688 - Use segment membership as a filter for dynamic content in email

* Changes needed after rebase to M5

* Merge pull request mautic#1407 from acquia/MAUT-5729

MAUT-5729 Dynamic Content Error - Segment Membership filter not showing correct content

* Fixing STAN

* CS fixes

* Test fix

* test fix part 2

* Adding back JS methods removed in a bad conflict resolution

---------

Co-authored-by: Lukáš Drahý <lukas@drahy.net>
Co-authored-by: Rohit Pavaskar <66303837+rohitp19@users.noreply.github.com>
Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>

* [UI] Increased icon size (mautic#13825)

* increased icon size

* decrease by 1px

* Make the search regular expression match both "&" and "&amp;" for link replacement within an email body (mautic#13858)

* Guide users to build optimized segments (mautic#13860)

* Merge pull request mautic#2172 from acquia/MAUT-11343

MAUT-11343 : Guide users to build optimized segments

* fix twig file issue

* Apply suggestions from code review

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

* push suggested changes

---------

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

* fix CSS flexbox broken in campaign insert clone view

* Revert "[UI] Replaces table action button `arrow-down` with `more-2` icon (mautic#13841)"

This reverts commit fadcf26.

* Revert "Segment membership as a new filter for dynamic email content (mautic#13528)"

This reverts commit 71031b7.

* Revert "[UI] Increased icon size (mautic#13825)"

This reverts commit c00df3c.

* Revert "Make the search regular expression match both "&" and "&amp;" for link replacement within an email body (mautic#13858)"

This reverts commit d3e6ceb.

* Revert "Guide users to build optimized segments (mautic#13860)"

This reverts commit bdabc26.

* Revert "add js code to hide profile pic if missing (mautic#13838)"

This reverts commit 76dd7d6.

---------

Co-authored-by: putzwasser <26040044+putzwasser@users.noreply.github.com>
Co-authored-by: John Linhart <admin@escope.cz>
Co-authored-by: Lukáš Drahý <lukas@drahy.net>
Co-authored-by: Rohit Pavaskar <66303837+rohitp19@users.noreply.github.com>
Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>
Co-authored-by: Miroslav Fedeleš <miroslav.fedeles@gmail.com>
Co-authored-by: Saurabh Gupta <48244990+dadarya0@users.noreply.github.com>
mautic#10306)

* fix: [DPMMA-1020] fix getLookupChoiceListAction for search with special characters

* fix: [DPMMA-1020] phpstan
* fix: [DPMMA-2661] Correct form mapper Mautic 5

* feat: [DPMMA-2661] Correct CSFixer
…tracking script (mautic#13859)

This fixes mautic#13355

This removes the HTML escaping logic in the onConfigSave method of `ConfigSubscriber`. This change prevents the UI from displaying escaped HTML in the custom tracking JS field after saving the form.

Previously, the form erroneously escaped HTML entities. By removing this code, users will now see the original HTML as expected when they revisit the form.

The main issue, however, was that re-saving  meant saving escaped HTML which would break inserting the tracking HTML code.

**Before**
1. Add custom HTML in `Configuration > Landing Page Settings > Analytics script (i.e. Google Analytics) `
2. Save
3. Open this view again → see escaped HTML
4. Save again
5. Open a landing page and see escaped HTML tracking code injected.

**After**
1. Add custom HTML in `Configuration > Landing Page Settings > Analytics script (i.e. Google Analytics) `
2. Save
3. Open this view again → see unescaped HTML
4. Save again
5. Open a landing page and see correct HTML tracking code injected.
@david-gap david-gap requested a review from mabumusa1 as a code owner August 8, 2024 08:29
@RCheesley
Copy link
Member

Hi @david-gap and welcome to the community!

Unfortunately, it looks like something has gone a bit wonky with your PR - there don't seem to be any changes and you have a bunch of commits which don't seem to be relevant. Did you need some assistance with making the PR?

@RCheesley RCheesley added pending-feedback PR's and issues that are awaiting feedback from the author needs-rebase PR's that need to be rebased labels Aug 12, 2024
Copy link

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.51%. Comparing base (81bbae3) to head (b8a4a56).
Report is 1 commits behind head on 5.x.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                5.x   #14048      +/-   ##
============================================
- Coverage     62.52%   62.51%   -0.01%     
  Complexity    34353    34353              
============================================
  Files          2260     2260              
  Lines        102740   102740              
============================================
- Hits          64234    64233       -1     
- Misses        38506    38507       +1     

see 1 file with indirect coverage changes

@david-gap david-gap marked this pull request as draft August 16, 2024 10:00
@david-gap
Copy link
Contributor Author

Hi @RCheesley
I would appreciate your assistance very much, because i don't see where i made mistakes. I followed the instructions on https://contribute.mautic.org/contributing-to-mautic/developer/code/pull-requests and in the my commit only two files marked as changed.
image
Today i pushed my branch again and it shows 15 changed files.

@RCheesley
Copy link
Member

It looks like you need to update your fork, because it's out of date with mautic/mautic.

This is usually done by rebasing - read more about that here: https://docs.ansible.com/ansible/latest/dev_guide/developing_rebasing.html

@david-gap david-gap marked this pull request as ready for review October 10, 2024 09:08
@jos0405
Copy link
Contributor

jos0405 commented Mar 17, 2025

This is actually a good solution for the problem mentioned.
I tested it and it works.

Copy link
Contributor

@jos0405 jos0405 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good fix.

@RCheesley
Copy link
Member

Hi @david-gap could you please rebase this on the 5.2 branch so it can be considered for merging? Thanks!

@RCheesley
Copy link
Member

I've just applied the PR template which should be used - @david-gap could you drop in some test instructions for people who are reviewing/testing? Many thanks!

@RCheesley RCheesley added bug Issues or PR's relating to bugs forms Anything related to forms code-review-needed PR's that require a code review before merging and removed pending-feedback PR's and issues that are awaiting feedback from the author labels Mar 17, 2025
@RCheesley RCheesley added the pending-test-confirmation PR's that require one test before they can be merged label Mar 17, 2025
@RCheesley RCheesley moved this to ⏳︎ Needs 1 more test in Open Source Fridays Mar 17, 2025
@RCheesley RCheesley linked an issue Mar 17, 2025 that may be closed by this pull request
1 task
@mautibot
Copy link
Contributor

This pull request has been mentioned on Mautic Forums. There might be relevant details there:

https://forum.mautic.org/t/drop-down-in-form-not-showing-custom-labels/30882/3

Copy link

@MadlenF MadlenF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as described!

@npracht npracht changed the base branch from 5.x to 5.2 May 6, 2025 12:09
@npracht npracht added ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged and removed pending-test-confirmation PR's that require one test before they can be merged needs-rebase PR's that need to be rebased code-review-needed PR's that require a code review before merging labels May 6, 2025
@npracht npracht moved this from ⏳︎ Needs 1 more test to 🎉 Ready to commit in Open Source Fridays May 6, 2025
@npracht
Copy link
Member

npracht commented May 6, 2025

2 reviews, good to merge i guess

@npracht npracht merged commit 02be5d1 into mautic:5.2 Jun 13, 2025
@github-project-automation github-project-automation bot moved this from 🎉 Ready to commit to 🥳 Done in Open Source Fridays Jun 13, 2025
@kuzmany kuzmany added this to the 5.2.7 milestone Jun 30, 2025
@kuzmany kuzmany changed the title FIX from load custom properties Fix form fields not loading when custom properties are defined Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs forms Anything related to forms ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged
Projects
Status: 🥳 Done
Development

Successfully merging this pull request may close these issues.

Form checkbox/radio/select - field mapped - custom properties not loading