Pip Posted May 27, 2021 Share Posted May 27, 2021 Hi all. I think I am being punked. I created a template called "batch" where I have "slotstotal" which is integer/text to store the value. Oddly, I have entered a value in on a page using the batch template via the PW admin. But when I do a print_r, I got this. I thought the field is bugged so recreated it with a different field name. Now when I refresh the page, I still got the same screen. (I tried changing the page a bit and it does reflect but the print_r is still the same. ? Link to comment Share on other sites More sharing options...
elabx Posted May 27, 2021 Share Posted May 27, 2021 3 hours ago, Pip said: Hi all. I think I am being punked. I created a template called "batch" where I have "slotstotal" which is integer/text to store the value. Oddly, I have entered a value in on a page using the batch template via the PW admin. But when I do a print_r, I got this. I thought the field is bugged so recreated it with a different field name. Now when I refresh the page, I still got the same screen. (I tried changing the page a bit and it does reflect but the print_r is still the same. ? Could you do a search through your codebase to find if somewhere you might be assigning that property to the page (a typo)?? At east it happens to me sometimes that I swap a variable's words like that lol Came for the title, stayed for the issue ? Like, wow what's FieldtypePhantom 2 Link to comment Share on other sites More sharing options...
Pip Posted May 27, 2021 Author Share Posted May 27, 2021 @elabx bet it got you excited. Don't think it's a typo. Especially if you do a print_r($batch); <?php // Check if today is in a batch $batches = $pages->find("template=batch, batchdatestart<=today, batchdateend>=today"); foreach ( $batches as $batch): print_r($batch); ?> And this is the output (now): Here's a screenshot of the template now (not touching it now I swear!!) Link to comment Share on other sites More sharing options...
Pip Posted May 27, 2021 Author Share Posted May 27, 2021 ..... now it's working. I think your response scared the bogey away, @elabx 1 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