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

Bugfix to avoid newline character \n in customFormSubmit URL #2518

Merged
merged 4 commits into from
Sep 2, 2022
Merged

Bugfix to avoid newline character \n in customFormSubmit URL #2518

merged 4 commits into from
Sep 2, 2022

Conversation

eneiasramos
Copy link
Contributor

Description (*)

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes OpenMage/magento-lts#<issue_number>

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added Component: Catalog Relates to Mage_Catalog Component: Sales Relates to Mage_Sales Template : base Relates to base template Template : rwd Relates to rwd template labels Aug 30, 2022
@sreichel
Copy link
Contributor

Thanks. Can you please add some/most relevant information? Reviews are easier when you know the problem from reading and see how its fixed :) (imho)

@eneiasramos
Copy link
Contributor Author

@sreichel I was inspecting an issue with the onclick event and a 3rd party plugin, then I found this:

a javascript call with \n between the parameters.

image

@sreichel
Copy link
Contributor

sreichel commented Sep 1, 2022

I agree with this change to put this in one line, but i'd use .... without $_cartUrl

onclick="customFormSubmit('<?php echo $this->getAddToCartUrlCustom($_product, [], false) ?>', '<?php echo $_params ?>', 'post')">

@eneiasramos
Copy link
Contributor Author

eneiasramos commented Sep 1, 2022

@sreichel I understand your point of view but I followed the same pattern as the lines below:

<?php $_wishlistUrl = $this->helper('wishlist')->getAddUrlWithCustomParams($_product, [], false); ?>

onclick="customFormSubmit('<?php echo $_wishlistUrl ?>', '<?php echo $_params ?>', 'post')">

<?php if ($_compareUrl = $this->getAddToCompareUrlCustom($_product, false)) : ?>

onclick="customFormSubmit('<?php echo $_compareUrl ?>', '<?php echo $_params ?>', 'post')">

@fballiano fballiano merged commit 5d9036e into OpenMage:1.9.4.x Sep 2, 2022
@sreichel
Copy link
Contributor

sreichel commented Sep 2, 2022

I understand your point of view but I followed the same pattern as the lines below:

Ah okay. Next time, please put such info into PR description ... :)

@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2022

Unit Test Results

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
7 runs  ±0  5 ✔️ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 5d9036e. ± Comparison against base commit 4db847a.

@eneiasramos
Copy link
Contributor Author

I understand your point of view but I followed the same pattern as the lines below:

Ah okay. Next time, please put such info into PR description ... :)

@sreichel perfect my dear! I will do this :)

Thank you! o/

@eneiasramos eneiasramos deleted the bugfix/customFormSubmit_newline_URL_catalogProductListTemplate branch September 2, 2022 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Relates to Mage_Catalog Component: Sales Relates to Mage_Sales Template : base Relates to base template Template : rwd Relates to rwd template
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants