suntrop Posted October 1, 2018 Posted October 1, 2018 Hi all I am using PW Markup Regions and perhaps have a problem related to that. The $_POST data exists double. When I put in /site/templates/_init.php at the top: var_dump($_POST); it prints out as array(0) { } array(0) { } Here is how my template/layout file looks like (removed everything non relating): <?php namespace ProcessWire; // board.php layout file // This is a layout file to render a specific page layout with given partial (content block) ?><!doctype html> <html class="no-js" lang="de"> <head> <meta charset="utf-8" /> </head> <body> <div class="project-title" data-pw-id="project-title"> <?php if ($page->template == 'board' || $page->template == 'group'): ?> <?= $board->get('title') ?> <?php else: ?> <?= $page->get('title') ?> <?php endif; ?> </div> <div class="board-control" data-pw-id="board-control">BOARD CONTROL</div> <div class="board-content" data-pw-id="board-content">BOARD CONTENT</div> </body> </html> When I remove all code there is just one $_POST left. Very strange: when I remove one or all of those three data-pw-id DIVs I get array(0) { } array(0) { }array(0) { }array(0) { } I have no idea why.
bernhard Posted October 1, 2018 Posted October 1, 2018 That's because of the way markup regions work: See the link to the github issue and ryans explanation. +1 for using Tracy, like Robin mentions in the post. 1
Pixrael Posted October 1, 2018 Posted October 1, 2018 https://github.com/processwire/processwire-issues/issues/224 2
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