Jump to content

fliwire

Members
  • Posts

    66
  • Joined

  • Last visited

Everything posted by fliwire

  1. 1- dont know where these came from, maybe those pages not exist because. if in 3 pages in trash warning says 3x3 pages deleted( Deleted 9 pages - Not all pages could be deleted (3 remain) ).. always multiplier x3 2- yes superuser, new processwire installation currently in dev. Imported 7000 pages with api. Dont know when this bug starts. 3- Deleted with superuser. Pages not locked. 4- Created new template and created a page for test, still same problem.
  2. No only installed "WireMailSmtp" . Tried "$pages->emptyTrash();" but still cant delete pages. pages table has only 2 pages in trash in database.
  3. Cant empty trash, how to fix this issue? in trash i have 2 pages, but says "Deleted 6 pages", if one page in trash warning is "Delete 3 pages" using 3.0.141 also tried 3.0.140 and 3.0.123 but not helps. only delete pages via "edit->delete menu".
  4. bernhard isnt InputfieldFile already upload file when form submit, why you call wireUpload again ?
  5. solved. forgot to add destinationPath to images2 field.
  6. why deleteAll() not working ? $u = user(); $u->of(false); $files = explode("|", $form->get("images2")->value); if($files) { $u->images->deleteAll(); // just want to one image, delete all images. - if delete this line images added. foreach($files as $file) { if($file && file_exists($upload_path . $file)){ $u->images->add($upload_path . $file); unlink($upload_path . $file); } } } $u->save(); // $u->images->deleteAll() not working so i used this. $u->images->delete($u->images->eq(0)); $u->save();
  7. calling $inputfield->getErrors(true) after form render solves this. another question if InputfieldFile in InputfieldFieldset form not get " enctype="multipart/form-data" " attr, this is bug ? $form = $modules->get("InputfieldForm"); $col1 = $modules->get("InputfieldFieldset"); $col1->importArray([ [ 'type' => 'InputfieldFile', 'name' => 'images', 'label' => 'Images', 'destinationPath' => $upload_path, 'extensions' => 'jpg jpeg gif png', 'maxFiles' => 3, 'maxFilesize' => 2*1024*1024, 'required' => 1 ], ]); $form->add($col1);
  8. Hi Soma using form api with this method but form errors always shows after first submit. How to clear after reload page ? <?php $form = $modules->get("InputfieldForm"); // create a text input $field = $modules->get("InputfieldText"); $field->label = "Name"; $field->attr('id+name', 'name'); $field->required = 1; $form->append($field); // append the field to the form // create email field $field = $modules->get("InputfieldEmail"); $field->label = "E-Mail"; $field->attr('id+name', 'email'); $field->required = 1; $form->append($field); // append the field // oh a submit button! $submit = $modules->get("InputfieldSubmit"); $submit->attr("value", "Subscribe"); $submit->attr("id+name", "submit"); $form->append($submit); if ($input->post->submit) { $form->processInput($input->post); } echo "<form action='./' method='post'>"; echo "<div class='row'>" . session()->CSRF()->renderInput() . "</div>"; echo "<div class='row'>" . $form->get('name')->render() . "</div>"; echo "<div class='row'>" . $form->get('name')->getErrors()[0] . "</div>"; echo "<div class='row'>" . $form->get('email')->render() . "</div>"; echo "<div class='row'>" . $form->get('email')->getErrors()[0] . "</div>"; echo "<div class='row'>" . $form->get('submit')->render() . "</div>"; echo "</form>";
  9. sorry for late answer:) why you not using anymore? another solution is form api ?
  10. installed this from gitlab but not working $modules->get('RockForms')->form; return null $modules->get('RockForms'); return object(ProcessWire\RockForms)#275 (1) { ["data"]=> array(3) { ["nettehny"]=> string(16) "comments message" ["uninstall"]=> string(0) "" ["submit_save_module"]=> string(6) "Submit" } }
  11. edited first code: $shipment = pages()->get($input->post->shipment_id);$shipment->of(false);$pages->delete($shipment, true); pw 3.0.98
  12. page has shipments ( repeater field ) with file field. $shipment = pages()->get($input->post->shipment_id); $shipment->of(false); $pages->delete($page, true); $page->of(false); $page->shipments->remove($pages->get($input->post->shipment_id)); $page->save(); both of work but give 500 error.. delete page with ajax. In console " Error: Call to a member function numChildren() on null (line 431 of \wire\core\PagesEditor.php) "
×
×
  • Create New...