1

I have enabled the templates hint for developer troubleshooting, but the hints not shown at frontend, do you know any reasons?

enter image description here

1
  • i saw some posts reporting the same issue but no solution, could anyone share your idea? Commented Sep 4, 2022 at 6:12

4 Answers 4

0

You can use these commands to enable/disable template path hints.

bin/magento dev:template-hints:enable
bin/magento dev:template-hints:disable

Flush the cache after enabling using bin/magento c:f

1
  • no, not working. Commented Sep 5, 2022 at 10:58
0

Sometime removing var files manually may also helps,

rm -rf generated/code/ generated/metadata/ var/cache/ var/view_preprocessed/ var/page_cache/

Update

And as per given snapshot of config, you have to add query string templatehints=magento at the end in URL like this

http://yourdomain.com/?templatehints=magento

If you don't want to use this kind of query string and want to show template hints on each request, please change Enable Hints for Storefront with URL Parameter to No

(don't forget to flush cache and run above rm command after this config change)

4
  • no, not working also. Commented Sep 5, 2022 at 10:58
  • See updated answer, that will might help you Commented Sep 6, 2022 at 7:49
  • yes, you're right. after add templatehints=magento to the url, the hints display. i never know this meaning, i learn it now. thanks. Commented Sep 6, 2022 at 8:40
  • Happy to hear that An up-vote and accepting answer will be appreciated if it is resolved by this answer. Commented Sep 6, 2022 at 9:07
0

Sometimes Path Hints won't be shown if:

  • The URL does not contain the templatehints parameter.
  • Developer Client Restrictions has an IP addressed listed that isn't yours.
  • The cache was not flushed after changing the option.
  • The site was changed to Production mode.

Developer Client Restrictions can be check in Stores -> Settings -> Configuration then Advanced -> Developer -> Developer Client Restrictions. Check that the Allowed IPs field is either blank, or contains your IP address.

5
  • Thanks, point #2 has flushed, #3 is developer mode, but #1 is interesting, i don't know this. what is developer client restriction, how can i find this out? Commented Sep 5, 2022 at 11:00
  • @DennisChan I've added the information to the Answer.
    – dotancohen
    Commented Sep 5, 2022 at 13:47
  • 1
    @DennisChan just to be sure - did you add the value to the url to see the hints?
    – Mario
    Commented Sep 5, 2022 at 14:36
  • 1
    yeah, finally find out the url requires a templatehints=xxxxx parameter to show the hints. many thanks. Commented Sep 6, 2022 at 8:43
  • @DennisChan It never occurred to me that perhaps the URL param was not included. I've amended the Answer with your tip. Thank you.
    – dotancohen
    Commented Sep 6, 2022 at 8:49
0

In my case the problem was lack of attention. basically I just disabled the IP Developer Client Restrictions->Allowed IPs setting. You can see the answer here: https://magento.stackexchange.com/a/374121/112377

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.