This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation

I discovered an issue with the Are You a Human Captcha via a support request.

While I had disabled it in edit mode by checking $page->isEditMode() a user reported still getting an error. It turns our that this user was editing a Form block in a Stack. The Dashboard Stack edit page does not report true to isEditMode() so I needed another way to detect and disable the captcha.

The Page object ends up having a path that begins with '/!stacks/', so I could check for that path beginning and disable the captcha. Here is a snippet that illustrates the idea.

$page = Page::getCurrentPage();
if (strpos($page->getCollectionPath(), '/!stacks/')) {
  // we are in the stack dashboard page
Loading Conversation