n98-magerun icon indicating copy to clipboard operation
n98-magerun copied to clipboard

dev:template-hints not working in current scope

Open benjamw opened this issue 8 years ago • 3 comments

When I manually edit the Template Hints settings in the Admin area of Magento, I use the "Main Website" scope to set or unset those values. This works perfectly.

When I use magerun to set or unset those values. It never works. I assumed that because I had previously set the values in the website scope that the new values in store scope would not work. But when I removed the website scope entries from the config table, it still didn't work.

What am I doing wrong? And if there's nothing I'm doing wrong, how can I edit the command classes to use self::SCOPE_WEBSITE instead of self::SCOPE_STORE_VIEW? Can I override them somehow in the .n98-magerun/modules directory?

benjamw avatar May 12 '16 05:05 benjamw

@benjamw: Thanks for the report. I have not yet verified it, but IIRC there are some annoyances like you describe them as I think I've been running over them in the past.

Can you with your report show those flags via config:get? This could shed some light about in which scope these are set. This should also help to find a good solution for your problem.

tkn98 avatar May 13 '16 06:05 tkn98

I'm not entirely convinced it's an issue with magerun. I'm continually having weird cache issues where my installation will alert me about messages that I deleted and show pages that are old. Even after I clear the cache.

But to answer your question: After turning the hints on via magerun

+---------------------------------+---------+----------+-------+
| Path                            | Scope   | Scope-ID | Value |
+---------------------------------+---------+----------+-------+
| dev/debug/profiler              | default | 0        | 0     |
| dev/debug/template_hints        | stores  | 1        | 1     |
| dev/debug/template_hints_blocks | stores  | 1        | 1     |
+---------------------------------+---------+----------+-------+

and after turning them off

+---------------------------------+---------+----------+-------+
| Path                            | Scope   | Scope-ID | Value |
+---------------------------------+---------+----------+-------+
| dev/debug/profiler              | default | 0        | 0     |
| dev/debug/template_hints        | stores  | 1        | 0     |
| dev/debug/template_hints_blocks | stores  | 1        | 0     |
+---------------------------------+---------+----------+-------+

benjamw avatar May 13 '16 18:05 benjamw

Hmm, config settings look correct. If cleaning cache does not work so well, check the file permissions on the cache folders. Sometimes it happens that files or directories are create with wrong or insufficient rights to get rid of them later.

ktomk avatar May 14 '16 08:05 ktomk