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

Magento 2.1 compatibility #3

Closed
mustdobetter opened this issue Jul 24, 2016 · 9 comments
Closed

Magento 2.1 compatibility #3

mustdobetter opened this issue Jul 24, 2016 · 9 comments
Assignees

Comments

@mustdobetter
Copy link

There are issues with the display of the scope hint text on system config fields in Magento 2.1. Please see attached screenshot.

screen shot 2016-07-24 at 12 25 53

@maderlock
Copy link

I think we're going to have to sort this out ourselves, @mustdobetter.

@erikhansen
Copy link
Collaborator

If either if you are willing to submit a PR to fix this issue, I'm sure @ericthehacker would appreciate it.

@erikhansen
Copy link
Collaborator

@ericthehacker Do you have any plans to fix 2.1.x compatibility any time in the near future? I have an M2 project right now where this module would come in very handy.

Since I took care of upgrading this extension to address the last breaking change, I think it's your turn. ;)

@ericthehacker ericthehacker self-assigned this Nov 18, 2016
@ericthehacker
Copy link
Owner

@erikhansen @mustdobetter @maderlock
I'm sure this issue is due to moving to UI components in 2.1. The soonest I could probably get to fixing it would be Christmas week, when I have some time off.

Sorry for the lack of response -- I've been very busy lately. :-/

@hostep
Copy link

hostep commented Nov 21, 2016

I took a quick look at this issue in case anyone is interested.

Currently the overridden data gets added to the html output using the getScopeLabel method.
And this is how the Scope Label is being rendered in Magento 2.0.x: https://github.com/magento/magento2/blob/2.0/app/code/Magento/Config/Block/System/Config/Form/Field.php#L60
In Magento 2.1.x, this has changed to: https://github.com/magento/magento2/blob/2.1/app/code/Magento/Config/Block/System/Config/Form/Field.php#L51

So the big issue is that the generated html is getting inserted into a html element which isn't closed yet which makes the browsers freak out.

I think that the way to solve this would involve rewriting the \Magento\Config\Block\System\Config\Form\Field::render method and adding your html directly in there at the correct place. But I'm not sure about this...

In case this gets fixed, I think this deserves a big version jump to v3.0.0, since it will probably be backwards incompatible with Magento 2.0.x

@paales
Copy link

paales commented Dec 12, 2016

Cant for this to be fixed!

@ericthehacker
Copy link
Owner

I have a fix in progress and should have a release this week. Stay tuned ... 👍

@ericthehacker
Copy link
Owner

ericthehacker commented Dec 28, 2016

All

2.1.x support is added in #5 . I'm going to do some more testing tomorrow (and hopefully merge and tag as 3.0.0), but if anyone wants to check out the associated feature branch in the meantime and give me any feedback, I'm all ears.

In this feature branch, I moved the actual output of the hint, since there's not a good place to inject without having to do string replacement on HTML otherwise.

Additionally, I found the functionality is affected by a core bug in 2.1.3.

Both of these are outlined in the updated README: https://github.com/ericthehacker/magento2-configscopehints/blob/feature/m2.1-support/README.md .

@ericthehacker
Copy link
Owner

All
I've merged #5, so this issue should (finally) be resolved. Thanks!

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

6 participants