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

Template path hints behavior #647

Closed
tzyganu opened this issue Sep 1, 2014 · 9 comments
Closed

Template path hints behavior #647

tzyganu opened this issue Sep 1, 2014 · 9 comments

Comments

@tzyganu
Copy link
Contributor

tzyganu commented Sep 1, 2014

I've enabled the template path hints for a website but they show up on the admin also.
I don't know if this is a bug or a feature.
I know that a lot of developers asked for template path hints in the admin on magento 1.x but my money is on a bug. If this is a feature I'm almost sure that this is not the way it should work.

Pre conditions:

  • Installed Magento 2. alpha93.
  • Used sample data from here. I don't think the sample data is the issue. Sample data has 1 website and 3 store views.

Steps to reproduce

  • Go to the backend: Stores->Configuration->Developer.
  • Change the scope to Main website (The Debug fieldset did not appear in the Default config scope)
  • In the Debug fieldset changed the values for Template Path Hints and Add Block Names to Hints to Yes.
  • Saved the config.

Expected Result
In the frontend I should see the template path hints for all the blocks and template in any page.

Actual result
Beside the expected result I also see in the backend the template path hints.

Additional info
All caches are off.
I ran this query on the database
select * from core_config_data where path = 'dev/debug/template_hints'.
I got only one result:

config_id scope scope_id path value
78 websites 1 dev/debug/template_hints 1

Changing the Template Path Hints back to No made the template hints disappear from the backend also.

I really hope this is a bug related to template path hints and not with the config loader.

@tzyganu tzyganu changed the title Template path hits behavior Template path hints behavior Sep 1, 2014
@verklov
Copy link
Contributor

verklov commented Sep 4, 2014

@tkacheva, please respond. Thank you!

@tkacheva
Copy link

tkacheva commented Oct 2, 2014

@tzyganu Thank you for bringing up the question.
Hints in the Admin are definitely not a bug. Some people use them and even more they ask us for improvements. There is another ticket on github #571

@tzyganu
Copy link
Contributor Author

tzyganu commented Oct 2, 2014

@tkacheva Thanks for getting back to me. I agree, template hints in admin can be a life saver, but the problem is I didn't enable the template hints for admin. I didn't even find a way to do it. I enabled them for a specific website, not from the default config section, but they still appear in the backend.

@wojtekn
Copy link
Contributor

wojtekn commented Dec 14, 2014

@tzyganu , I agree, I would also consider that as bug. It looks that currently there is no possibility to enable hints only for frontend. I tried to enable them for Store View scope and they appear in both frontend and backend.

However, ability to enable template hints for backend only sounds also like a good idea.

@ctubio
Copy link
Contributor

ctubio commented Apr 19, 2015

Sorry for that recent duplicate.

Please, do not mix the feature of allowing template hints in the adminhtml pages with the bug of the template hints showing in adminhtml pages even if the template hints are just enabled for a single store view.

If template hints should be allowed in adminhtml pages, a new configuration option should be added rather than force it implicit together with whatever similar option already exists.
Just because not all administrators users are developers.

Note that this bug not only affects template hints, but also any other config.
For example, if you choose to Merge CSS Files in a single store view, you will end up with merged css files in adminhtml pages too.

in the attempt to fix it:
I belive the problem is not in the DebugHints plugin neither in the config loader, but it is in the store manager.

Even if the table store have those records:

store_id code website_id group_id name sort_order is_active
0 admin 0 0 Admin 0 1
1 default 1 1 Default Store View 0 1

the following code when executed in frontend AND in adminhtml pages:

$storeManager = $this->objectManager->get('Magento\Store\Model\StoreManager');
die($storeManager->getStore()->getCode().':'.$storeManager->getStore()->getId());

always return default:1 everywhere.

but i can't find why it doesn't return admin:0 in adminhtml pages 😭

@erikhansen
Copy link
Contributor

Just recently encountered this issue. I enabled Template Path Hints for a specific website and hints were displaying in the admin.

I definitely appreciate the ability to enable Template Path Hints in the admin, but there should be an explicit way to do that, rather than admin hints being enabled any time hints on the frontend are enabled.

@tkacheva
Copy link

Thank you all for your input. I will update you once we fix the issue

@tkacheva
Copy link

MAGETWO-42869

@piotrekkaminski
Copy link
Contributor

This should be fixed now and soon be available on github.

okorshenko pushed a commit that referenced this issue Dec 14, 2016
[MPI] Card is not saved after checkout with Braintree Credit Card using Vault
magento-engcom-team added a commit that referenced this issue May 2, 2019
…ing Method #647

 - Merge Pull Request magento/graphql-ce#647 from magento/graphql-ce:646-incorrect-selected-shipping-method
 - Merged commits:
   1. 91d8a92
   2. 64e76c4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants