Forum
Perch Forms creates a blank sub-page to the page the form was on
I have created a form as part of a multi-item region.
On submitting the form first time, I get the following error:
Fatal error: Call to undefined method Perch::event() in /Users/simonclay/Dropbox/Clients/Arthur Edward/Website/Arthur Edward Website/perch/core/apps/content/PerchContent_Pages.class.php on line 39
I then press back on the browser and click submit again, this time I get the success message, and the form is processed as expected.
However, in Admin > Pages, I see that it has somehow created a new blank sub-page (with no regions) under the page that the form is on.
If I delete the page, I get the error message:
Not Found
The requested URL /perch/core/apps/content/<br /><b>Warning</b>: unlink(/Users/simonclay/Dropbox/Clients/Arthur Edward/Website/Arthur Edward Website//available-roles/): Operation not permitted in <b>/Users/simonclay/Dropbox/Clients/Arthur Edward/Website/Arthur Edward Website/perch/core/apps/content/PerchContent_Page.class.php</b> on line <b>143</b><br />/perch/core/apps/content/ was not found on this server.
Clicking back on the browser and refreshing the page list show the page is deleted.
But when I submit the form I get the original error again.
Here is my form template:
<!--detail-->
<div class="col-md-8 job-detail">
<h1><perch:content id="job_title" type="text" label="Job Title" required="true" title="true" /></h1>
<div class="row">
<div class="info">
<div class="col-sm-4">Job Number: <perch:content id="job_id" type="text" label="Job Number" required="true" /></div>
<div class="col-sm-4 text-center">Location: <perch:content id="location" type="text" label="Location" /></div>
<div class="col-sm-4 text-right">Salary: <perch:content id="salary" type="text" label="Salary" /></div>
</div>
</div>
<perch:content id="job_description_excerpt" type="textarea" label="Job Description Excerpt" html="false" help="A short description of the job for the listing page" size="xs" suppress="true" />
<perch:content id="job_description_full" type="textarea" label="Job Description" html="true" editor="redactor" imagewidth="750" imageheight="500" />
</div>
<!--sideabr-->
<div class="col-md-3 col-md-offset-1">
<div class="sidebar-box">
<h3>Apply for this role</h3>
<div class="widget-search">
<perch:form id="job_application" method="post" app="perch_forms">
<perch:input type="hidden" id="ref" value="<perch:content id="job_id" type="text" label="Job Number" required="true" />" />
<div class="row">
<div class="col-md-12">
<perch:input type="select" options="Mr,Mrs,Miss,Master" />
</div>
<div class="col-md-12">
<div class="error">
<perch:error for="name" type="required">Please add your name</perch:error>
</div>
<perch:input type="text" id="name" required="true" label="Name" class="form-control" placeholder="First name..." />
</div>
<div class="col-md-12">
<div class="error">
<perch:error for="surname" type="required">Please add your surname</perch:error>
</div>
<perch:input type="text" id="surname" required="true" label="Surname" class="form-control" placeholder="Surname..." />
</div>
<div class="col-md-12">
<div class="error">
<perch:error for="email" type="required">Please add your email address</perch:error>
<perch:error for="email" type="format">Please check your email address</perch:error>
</div>
<perch:input type="email" id="email" required="true" label="Email" class="form-control" placeholder="Email..." />
</div>
<div class="col-xs-12">
Upload your CV
<input type="file"></input>
<div class="error">
<perch:error for="cv" type="filetype"><span class="error">File must be a PDF or Office document.</span></perch:error>
<perch:error for="cv" type="fileupload"><span class="error">Couldn't upload the file - it may be too large.</span></perch:error>
</div>
</div>
<div class="col-xs-12 hidden">
<perch:input type="text" id="type" antispam="honeypot" />
</div>
<div class="space-20"></div>
<div class="col-md-12 text-right">
<perch:input type="submit" id="submit" value="Submit" class="btn btn-lg btn-primary" />
</div>
<perch:success>
<div class="success-message">
<span class="glyphicon glyphicon-ok form-control-feedback"></span>
Thank you, your application has been sent. We will be in touch soon.
</div>
</perch:success>
</div>
</perch:form>
</div>
</div><!--sidebar-box-->
</div><!--sideabr end-->
<perch:content id="slug" type="slug" for="job_title job_id" suppress="true" />
Perch is up to date
PHP 5.4.34 version is okay, but a little out of date. Consider updating soon.
MySQL 5.5.38 is up to date
Image processing available
SUMMARY INFORMATION
Perch: 2.7.2, PHP: 5.4.34, MySQL: 5.5.38, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.7.2), assets (2.7.2), categories (2.7.2), perch_forms (1.8)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/simonclay/Dropbox/Clients/Arthur Edward/Website/Arthur Edward Website/perch
PERCH_CORE: /Users/simonclay/Dropbox/Clients/Arthur Edward/Website/Arthur Edward Website/perch/core
PERCH_RESFILEPATH: /Users/simonclay/Dropbox/Clients/Arthur Edward/Website/Arthur Edward Website/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
Resource folder writeable: Yes
HTTP_HOST: arthuredward:8888
DOCUMENT_ROOT: /Users/simonclay/Dropbox/Clients/Arthur Edward/Website/Arthur Edward Website
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Does the page that the form is on exist within Perch?
Yes, it does.
Ok, leave it with me.
Ok thanks Drew.
It's happening on all forms in the site.
I have moved the resulting blank pages to the bottom of the page tree in admin so as not to confuse the client and marked them to 'Hide from main navigation' to stop them breaking the nav.
Try Forms 1.8.1
Fixed. Thank you Drew.