MarcC Posted September 11 Share Posted September 11 Hi, Related to this thread I started recently, I wanted to follow up and check on the expected behavior for the Tracy Debugger Console. In my template files, there was a preg_replace operation on the $page->body property. The TD Console showed the result of this template operation after executing "echo $page->body". Is this the normal / expected behavior, as opposed to simply showing the field HTML content from the DB? The DB itself showed the unchanged HTML for the body field. Just wanted to check since it will help me understand how to troubleshoot better next time. Thanks! Link to comment Share on other sites More sharing options...
adrian Posted September 11 Share Posted September 11 Hi @MarcC - it should only work that way if you check the "Template resources" option in the Console. If it's happening for you without that checked can you please provide the exact code you have in your template that is resulting in this. 1 1 Link to comment Share on other sites More sharing options...
BrendonKoz Posted September 12 Share Posted September 12 14 hours ago, adrian said: Hi MarcC - it should only work that way if you check the "Template resources" option in the Console. I didn't even know that was a thing! ❤️ 1 Link to comment Share on other sites More sharing options...
MarcC Posted September 12 Author Share Posted September 12 On 9/11/2024 at 4:20 PM, adrian said: Hi @MarcC - it should only work that way if you check the "Template resources" option in the Console. If it's happening for you without that checked can you please provide the exact code you have in your template that is resulting in this. That's an awesome feature, I'll look into it further. Thank you. Link to comment Share on other sites More sharing options...
adrian Posted September 12 Share Posted September 12 @MarcC - your response makes me think I didn't explain things properly because given the behavior you're seeing, I feel like you are probably already using that feature. If you're not using it, then there might be a bug causing the issue you are seeing so it would be great to know more about how you have things set up. 1 Link to comment Share on other sites More sharing options...
MarcC Posted September 13 Author Share Posted September 13 17 minutes ago, adrian said: @MarcC - your response makes me think I didn't explain things properly because given the behavior you're seeing, I feel like you are probably already using that feature. If you're not using it, then there might be a bug causing the issue you are seeing so it would be great to know more about how you have things set up. Ah, I was guessing that the feature might have been enabled by default when I installed the module, or otherwise bumped 😅. But if not default...I kinda doubt I bumped it... I don't see it anywhere now that I'm looking. v4.26.36, somewhere in the Console panel? I do see references to the term "Template resources" in settings and I was able to add the separate $ panel to the front end view. That's a really helpful panel btw. Link to comment Share on other sites More sharing options...
adrian Posted September 13 Share Posted September 13 It will appear as a checkbox on the Console when used on the frontend. Compare: with: The code in home.php is: $page->title = 'Test modify'; which only takes effect if that "Template resources" option is checked. 1 Link to comment Share on other sites More sharing options...
MarcC Posted September 13 Author Share Posted September 13 25 minutes ago, adrian said: It will appear as a checkbox on the Console when used on the frontend. Compare: ... which only takes effect if that "Template resources" option is checked. OK, thanks! I see it now, on the front end. I upgraded the module since my investigation, so maybe I was encountering something going on with a previous version. I was testing on the back end, this checkbox wasn't there, and I was getting template-processed output. (Edit: I can check again just in case...) Link to comment Share on other sites More sharing options...
adrian Posted September 13 Share Posted September 13 If you were testing on the backend, I am struggling to figure out how a template could be involved. I don't even know how it would get the code the from the template. Can you please provide the relevant code from the template and the code you were running in the console that is causing this. Otherwise I really am just guessing :) 2 Link to comment Share on other sites More sharing options...
MarcC Posted September 13 Author Share Posted September 13 39 minutes ago, adrian said: If you were testing on the backend, I am struggling to figure out how a template could be involved. I don't even know how it would get the code the from the template. Can you please provide the relevant code from the template and the code you were running in the console that is causing this. Otherwise I really am just guessing 🙂 OK. I am going to try to reproduce first. Because it would suck to hand over to you the very simple regex-replace code which now does nothing out of the ordinary, post-the-recent-module-upgrade. 😄 And thanks again for your kind response. 👍 Link to comment Share on other sites More sharing options...
adrian Posted September 18 Share Posted September 18 On 9/12/2024 at 5:55 PM, MarcC said: I upgraded the module since my investigation, so maybe I was encountering something going on with a previous version. What version were you running before? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now