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

html class generation from payment processor type (machine) name (was "Display issues") #367

Closed
yashodha opened this issue Jun 1, 2021 · 14 comments

Comments

@yashodha
Copy link

yashodha commented Jun 1, 2021

There is a display issue with the payment processor selector for Credit Card payment.

The issue seems to be with the new version of CiviCRM that is adding a class "name of payment processor" in the code when there was only the class "crm-form-radio" before.
For Paypal, it's adding a class "payment_processor_paypal_standard" where all spaces in processor name have been replaced with underscoress, which is fine.
But for iATS 1st pay, the system is not adding underscores to the payment processor name when adding the class, which creates all these useless classes including the "card" class, when really it should be "payment_processor_iats_payments_1stpay_credit_card"

See attached files to compare

Older version
payment processor selector class ALH

Latest version
payment processor selector class FFF_issue

@yashodha
Copy link
Author

yashodha commented Jun 1, 2021

This results in display issues in Wordpress
pay

I think this is because the name is spaced instead of underscored like others
Screenshot from 2021-06-01 21:41:51

@yashodha
Copy link
Author

yashodha commented Jun 2, 2021

@adixon @KarinG thoughts?

@adixon
Copy link
Contributor

adixon commented Jun 2, 2021

Fascinating, and a new issue to me. What version(s) of civicrm/iats are you using here?

@yashodha
Copy link
Author

yashodha commented Jun 3, 2021

@adixon

CiviCRM : 5.28.1
iATS : 1.7.4

@KarinG
Copy link
Contributor

KarinG commented Jun 3, 2021

I'm seeing this with legacy and on CiviCRM 5.35.2 as well. It's not causing any problems on this site (Drupal).

image

@yashodha
Copy link
Author

@KarinG This causes problems in wordpress not drupal.

@adixon adixon changed the title Display issues html class generation from payment processor type (machine) name (was "Display issues") Jan 7, 2022
@adixon
Copy link
Contributor

adixon commented Jan 7, 2022

I'm not convinced this is an iATS extension issue. Although all the examples you're listing have machine names that can just be used as a class, that's not part of the requirements/contract of the payment processor machine name.

If I'm correct, it's a wordpress-civicrm issue that it's not converting the names to be "class safe".

Happy to be corrected ...

@yashodha
Copy link
Author

yashodha commented Jan 27, 2022

@adixon @KarinG

FYI : am seeing the css issue on D9 as well now. (culprit is same having card as class)
mmm

@adixon
Copy link
Contributor

adixon commented Jan 27, 2022

That doesn't seem like quite the same issue - but in any case, it's not extension specific right?

@philmb
Copy link

philmb commented Feb 1, 2022

Just setting up iATS for the first time, and I confirm that this is an issue with Joomla, not just WP. Display on the site shows exactly like yashodha's image above where the radio button input is displayed above its label due to .card class display=block

Joomla! 3.9.24, Civi 5.39.0, iATS extension 1.7.4

@adixon
Copy link
Contributor

adixon commented Feb 1, 2022

Hey @philmb - I wonder if I need to be more clear? This issue is about the generation of html by civicrm (in combination with it's CMS). It appears that some of that html generation is making an assumption about the machine name of processors as "class safe", which is not correct. It shows up for IATS because iATS (unlike most core processors) has a space in it's machine name. It's not an iATS issue, or something that can even be corrected within the extension. I can leave this issue open for others, but there's nothing I can do to fix your issue within the extension code.

In order to fix it, please post (referring to this issue) in the civicrm-joomla issue queue, here:

https://lab.civicrm.org/dev/joomla/-/issues

@adixon
Copy link
Contributor

adixon commented Feb 10, 2022

I'm wrong! It's a CiviCRM Core issue from this commit:

civicrm/civicrm-core@1421b01

which was part of this PR

civicrm/civicrm-core#16595

Thanks for your persistence ...

@yashodha
Copy link
Author

yashodha commented Mar 4, 2022

@adixon will you be filing a ticket for the same?

@adixon
Copy link
Contributor

adixon commented Mar 4, 2022

This was fixed in core a few weeks ago.

civicrm/civicrm-core#22760

@adixon adixon closed this as completed Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants