Watch out for <perch:showall>

  • :D This is an issue I resolved myself, but I'm posting it here to save somebody else the couple hours I spent today trying to figure it out.

    It's been several years since we handed off to our clients a complex Runway site. Client recently asked us to revisit the site to update a bunch of pages, and while looking at source of the pages in the browser I noticed that the Perch backend template was appearing in what looked like debug output, commented out (fortunately). But I checked debug in config and it was set to false!

    Surely, I reasoned, it could not be standard behavior that debug would appear in output page code -- even commented out? That seemed weird and a certainly would have noticed it years ago as this particular content template runs to about 400 lines in post!

    Long story short, I finally spotted a line <!-- <perch:showall> --> in my content template. I never noticed that even though it was commented out it was still faithfully "showing all" for all these years. Chalk that up to my forgetting that templates require special commenting, not HTML commenting.

    Moral: use <perch:showall> to troubleshoot your complex content template during production, but delete it outright before you go live, or comment it out properly.