Flashmaster82
Members-
Posts
182 -
Joined
-
Last visited
Everything posted by Flashmaster82
-
☁️ Duplicator: Backup and move sites
Flashmaster82 replied to flydev's topic in Module/Plugin Development
I get error when trying to install package. Deprecated: strrpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in E:\Wamp\www\Website\installer.php on line 709. -
Working great with the new version /thanks
-
Not working! I installed the latest update 0.3.3 and then the option to paste url at the image field is gone??
-
The first error was when i click on help under Migration Action. And the second error was when i created a new migration and hit save.
-
Warning: Attempt to read property "id" on null in E:\Wamp\www\Test1\wire\core\PagesEditor.php on line 317 PagesEditor: Error saving field "Migration item" — Can’t save page (id=1070): /admin/repeaters/for-field-102/for-page-1067/1727216184-5518-1/: Call $page->of(false); before getting/setting values that will be modified and saved. [Page::statusCorrupted] fields: dbMigrateType, dbMigrateAction Bootstrap not fully installed - Attempting re-install.
-
Migration Actions Help (link) Fatal error: Uncaught Error: Call to a member function bd() on null in E:\Wamp\www\Test1\site\modules\ProcessDbMigrate\DbMigrateHelp.php on line 3 ( ! ) Error: Call to a member function bd() on null in E:\Wamp\www\Test1\site\modules\ProcessDbMigrate\DbMigrateHelp.php on line 3. PagesEditor: Error saving field "Migration item" — Can’t save page (id=1065): /admin/repeaters/for-field-121/for-page-1062/1727215638-3146-1/: Call $page->of(false); before getting/setting values that will be modified and saved. [Page::statusCorrupted] fields: dbMigrateType, dbMigrateAction On Migration Actions i cant see "install migration". And also the DB backup, is that a separate module or should that be installed with this module? Its a bit confusing. I dont know how to migrate from one database to another, is there an upload or something?
-
I did a new installation and now it installed correctly. Maybe there where corrupt files in the database or something.
-
Not of my testsite no. I tried now to install to a clean testsite and it installed the module and the migrations link is under setup but on click Snapsicles… Compile Error: Class declarations may not be nested (line 9 of E:\Wamp\www\Test2\wire\core\WireDebugInfo.php) FYI I´m using the master version 3.0.229 on localhost/Wamp.
-
I guess it did not installed correctly then.. Also when uninstall the module templates are still in the system and can´t be removed because its system templates.
-
If installed correctly, should there be a link of sort in the left tree menu under setup for settings or similar? I tried to install the module again and there where a couple of errors but its in the module directory. But i dont see any link to the module besides in the module directory.
-
When installing Bootstrap failed Missing parent or template for page "/Test1/processwire/dbmigrations/". Page not created/saved in this installation attempt (may be achieved later). Missing parent or template for page "/Test1/processwire/dbcomparisons/". Page not created/saved in this installation attempt (may be achieved later). After uninstall Fields: Fieldtype module 'FieldtypeDbMigrateRuntime' for field 'dbMigrateRuntimeReady' is missing (Can´t get rid of this error message in the top).
-
@MarkE Thank you so much.
-
Error installing module - ProcessDbMigrate ModulesInstaller: Unable to install module (ProcessDbMigrate): You must assign a template to the page before setting field values (dbM)
-
Weekly update – 28 October 2022 – TinyMCE Inputfield released
Flashmaster82 replied to ryan's topic in News & Announcements
When paste an image into the field and then resize it, it will remove the image? Also when i try to upload from the toolbar "image" from my computer it will just spin. Also if you try to upload from the "quickimage" then it will not place the image? Any fix? -
On install PW 3 ( ! ) Error: Call to undefined function ProcessWire\bd() in E:\Wamp\www\Test1\site\modules\ProcessDbMigrate\ProcessDbMigrate.module.php on line 693
-
I can´t install this module Fatal Error: Uncaught Error: Call to a member function add() on null in site/modules/SkipInputfieldLabel/SkipInputfieldLabel.module.php:41
-
<?php namespace Processwire; $contact_form = $pages->get("template=contact"); $company = $pages->get("template=company"); $form = new \FrontendForms\Form('Form'); $form->setHtml5Validation(true); // Enable HTML5 browser validation // First Name $firstname = new \FrontendForms\InputText('scf_firstname'); $firstname->setLabel($fields->get('scf_firstname')->$label); $firstname->setRule('required'); $form->add($firstname); // Last Name $lastname = new \FrontendForms\InputText('scf_lastname'); $lastname->setLabel($fields->get('scf_lastname')->$label); $lastname->setRule('required'); $form->add($lastname); // Phone $phone = new \FrontendForms\InputText('scf_phone'); $phone->setLabel($fields->get('scf_phone')->$label); $phone->setRule('required'); $form->add($phone); // Email $email = new \FrontendForms\InputText('scf_email'); $email->setLabel($fields->get('scf_email')->$label); $email->setRule('required'); $form->add($email); // SERVICES $service = new \FrontendForms\Select('scf_service'); $service->setLabel(__($fields->get('scf_service')->$label)); // Add options dynamically based on existing pages $services = wire('pages')->find('template=insurance|telephony|pension, sort=name'); // Add options dynamically based on existing pages foreach ($services as $servicePage) { $service->addOption($servicePage->title, $servicePage->id); } $form->add($service); $message = new \FrontendForms\Textarea('scf_message'); $message->setLabel($fields->get('scf_message')->$label); $message->setRule('required'); $form->add($message); $button = new \FrontendForms\Button('submit'); $button->setAttribute('value', $fields->get('label_send')->label); $button->setAttribute('class', 'btn btn-primary'); // Add the CSS class $form->add($button); if($form->isValid()){ $p = new Page(); $p->template = 'contact_inquiry'; $p->parent = wire('pages')->get('template=contact'); $p->title = $form->getValue('scf_firstname') . ' ' . $form->getValue('scf_lastname'); $p->scf_firstname = $form->getValue('scf_firstname'); $p->scf_lastname = $form->getValue('scf_lastname'); $p->scf_phone = $form->getValue('scf_phone'); $p->scf_email = $form->getValue('scf_email'); $p->scf_service = $form->getValue('scf_service'); $p->scf_message = $form->getValue('scf_message'); // Set the scf_date field to the current date and time with the correct timezone $dateTime = new \DateTime('now', new \DateTimeZone('Europe/Stockholm')); $p->scf_date = $dateTime->format('Y-m-d H:i:s'); $p->save(); // Retrieve the title of the selected legal service $selectedserviceID = $form->getValue('scf_service'); $selectedservice = wire('pages')->get($selectedserviceID); $selectedserviceTitle = $selectedservice ? $selectedservice->title : 'Not specified'; // Initialize $messageBody $messageBody = ''; $m = wireMail(); $m->to('test@gmail.com'); $m->subject("{$contact_form->scf_email_title} {$selectedserviceTitle}, {$form->getValue('scf_firstname')} {$form->getValue('scf_lastname')}"); // Set "Reply-To" address $m->header('Reply-To', $form->getValue('scf_email') . ' (' . $form->getValue('scf_firstname') . ' ' . $form->getValue('scf_lastname') . ')'); $messageBody .= "<strong>{$fields->get('scf_firstname')->label}:</strong> " . $form->getValue('scf_firstname') . "<br>"; $messageBody .= "<strong>{$fields->get('scf_lastname')->label}:</strong> " . $form->getValue('scf_lastname') . "<br>"; $messageBody .= "<strong>{$fields->get('scf_phone')->label}:</strong> " . $form->getValue('scf_phone') . "<br>"; $messageBody .= "<strong>{$fields->get('scf_email')->label}:</strong> " . $form->getValue('scf_email') . "<br><br>"; $messageBody .= "<strong>{$fields->get('scf_service')->label}:</strong> " . $selectedserviceTitle . "<br><br>"; $messageBody .= "<strong>{$fields->get('scf_message')->label}</strong><br>" . $form->getValue('scf_message') . "<br>"; $m->bodyHTML($messageBody); $m->send(); // Set up the email for the form submitter $confirmationEmail = wireMail(); $confirmationEmail->to($form->getValue('scf_email')); $confirmationEmail->subject("{$contact_form->scf_email_confirmation_title} {$selectedserviceTitle}"); $confirmationMessage = "{$contact_form->scf_email_confirmation_message}"; $confirmationEmail->bodyHTML($confirmationMessage); $confirmationEmail->send(); // Redirect to the success page wire('session')->redirect(wire('config')->urls->root . 'arendet-skickades/'); } echo $form->render(); ?> When i insert like XX into the email field there is an error Error: Exception: Invalid email address (in E:\Wamp\www\website\wire\core\WireMail.php line 162). I dont know how to validate the email adress before sending the form. Any clues?
-
Can´t install this module: ProcessModule: Module is not installable because not all required dependencies are currently met. What other modules do i need to install to get this to work?
-
☁️ Duplicator: Backup and move sites
Flashmaster82 replied to flydev's topic in Module/Plugin Development
Can´t install my site with the downloaded duplicated version. Duplicator 1.5.2. Processwire 3.0.229 Deprecated: strrpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in E:\Wamp\www\..\installer.php on line 709 -
<?php namespace Processwire; $form = new \FrontendForms\Form('myForm'); $firstname = new \FrontendForms\InputText('scf_firstname'); $firstname->setLabel($fields->get('scf_firstname')->$label); $firstname->setRule('required'); $form->add($firstname); $lastname = new \FrontendForms\InputText('scf_lastname'); $lastname->setLabel($fields->get('scf_lastname')->$label); $lastname->setRule('required'); $form->add($lastname); $phone = new \FrontendForms\InputText('scf_phone'); $phone->setLabel($fields->get('scf_phone')->$label); $phone->setRule('required'); $form->add($phone); $email = new \FrontendForms\InputText('scf_email'); $email->setLabel($fields->get('scf_email')->$label); $email->setRule('required'); $form->add($email); $legalservice = new \FrontendForms\Select('scf_legalservice'); $legalservice->setLabel(__($fields->get('scf_legalservice')->$label)); // Add options dynamically based on existing pages $legalservices = wire('pages')->find('template=legal_service'); foreach ($legalservices as $service) { $legalservice->addOption($service->title, $service->id); } $form->add($legalservice); $message = new \FrontendForms\Textarea('scf_message'); $message->setLabel($fields->get('scf_message')->$label); $message->setRule('required'); $form->add($message); $button = new \FrontendForms\Button('submit'); $button->setAttribute('value', $fields->get('label_send')->label); $form->add($button); if($form->isValid()){ $p = new Page(); $p->template = 'contact_inquiry'; $p->parent = wire('pages')->get('template=contact'); $p->title = $form->getValue('scf_firstname') . ' ' . $form->getValue('scf_lastname'); $p->scf_firstname = $form->getValue('scf_firstname'); $p->scf_lastname = $form->getValue('scf_lastname'); $p->scf_phone = $form->getValue('scf_phone'); $p->scf_email = $form->getValue('scf_email'); $p->scf_legalservice = $form->getValue('scf_legalservice'); $p->scf_message = $form->getValue('scf_message'); // Set the scf_date field to the current date and time with the correct timezone $dateTime = new DateTime('now', new DateTimeZone('Europe/Stockholm')); $p->scf_date = $dateTime->format('U'); // 'U' format returns the Unix timestamp $p->save(); $m = wireMail(); $m->to('info@...'); // please change it $m->subject('Nytt ärende'); $messageBody .= "<strong>{$fields->get('scf_firstname')->label}:</strong> " . $form->getValue('scf_firstname') . "<br>"; $messageBody .= "<strong>{$fields->get('scf_lastname')->label}:</strong> " . $form->getValue('scf_lastname') . "<br>"; $messageBody .= "<strong>{$fields->get('scf_phone')->label}:</strong> " . $form->getValue('scf_phone') . "<br>"; $messageBody .= "<strong>{$fields->get('scf_email')->label}:</strong> " . $form->getValue('scf_email') . "<br>"; // Retrieve the title of the selected legal service $selectedLegalServiceID = $form->getValue('scf_legalservice'); $selectedLegalService = wire('pages')->get($selectedLegalServiceID); $selectedLegalServiceTitle = $selectedLegalService ? $selectedLegalService->title : 'Not specified'; $messageBody .= "<strong>{$fields->get('scf_legalservice')->label}:</strong> " . $selectedLegalServiceTitle . "<br>"; $messageBody .= "<strong>{$fields->get('scf_message')->label}:</strong> " . $form->getValue('scf_message') . "<br>"; $m->bodyHTML($messageBody); $m->send(); // Redirect to the success page wire('session')->redirect(wire('config')->urls->root . 'forfragan-skickades/'); } echo $form->render(); ?>
-
This is so strange. Now with your code im receiving email. But with this code i will not receive any email? <?php namespace Processwire; ?> <div class="container col-5 tmar10"> <?php $form = new \FrontendForms\Form('myForm'); $firstname = new \FrontendForms\InputText('scf_firstname'); $firstname->setLabel(__($fields->get('scf_firstname')->label)); $firstname->setRule('required'); $firstname->setAttribute('class', 'w3-input w3-border w3-margin-bottom'); $form->add($firstname); $lastname = new \FrontendForms\InputText('scf_lastname'); $lastname->setLabel(__($fields->get('scf_lastname')->label)); $lastname->setRule('required'); $lastname->setAttribute('class', 'w3-input w3-border w3-margin-bottom'); $form->add($lastname); $phone = new \FrontendForms\InputText('scf_phone'); $phone->setLabel(__($fields->get('scf_phone')->label)); $phone->setRule('required'); $phone->setAttribute('class', 'w3-input w3-border w3-margin-bottom'); $form->add($phone); $email = new \FrontendForms\InputText('scf_email'); $email->setLabel(__($fields->get('scf_email')->label)); $email->setRule('required'); $email->setRule('email'); $email->setAttribute('class', 'w3-input w3-border w3-margin-bottom'); $form->add($email); $legalservice = new \FrontendForms\Select('scf_legalservice'); $legalservice->setLabel(__($fields->get('scf_legalservice')->label)); // Add options dynamically based on existing pages $legalServices = wire('pages')->find('template=legal_service'); foreach ($legalServices as $service) { $legalservice->addOption($service->title, $service->id); } $legalservice->setAttribute('class', 'w3-select w3-border w3-margin-bottom'); $form->add($legalservice); $message = new \FrontendForms\Textarea('scf_message'); $message->setLabel(__($fields->get('scf_message')->label)); $message->setRule('required'); $message->setAttribute('class', 'w3-input w3-border w3-margin-bottom'); $form->add($message); $button = new \FrontendForms\Button('submit'); $button->setAttribute('value', __($fields->get('label_send')->label)); $button->setAttribute('class', 'w3-btn w3-round w3-blue'); $button->addWrapper()->setAttribute('class', 'w3-padding-24 w3-center'); $form->add($button); if ($form->isValid()) { // Form data is valid, save to a new page $p = new Page(); $p->template = 'contact_inquiry'; $p->parent = wire('pages')->get('template=contact'); $p->title = $form->getValue('scf_firstname') . ' ' . $form->getValue('scf_lastname'); $p->scf_firstname = $form->getValue('scf_firstname'); $p->scf_lastname = $form->getValue('scf_lastname'); $p->scf_phone = $form->getValue('scf_phone'); $p->scf_email = $form->getValue('scf_email'); $p->scf_legalservice = $form->getValue('scf_legalservice'); $p->scf_message = $form->getValue('scf_message'); // Set the scf_date field to the current date and time $p->scf_date = time(); $p->save(); // send an email $m = wireMail(); $m->to('info@....com'); $m->subject(_('New message from the contact form')); $m->fromName($form->getValue('scf_firstname') . ' ' . $form->getValue('scf_lastname')); $m->from('noreply@....se'); // Customize the email message body $messageBody = "First Name: " . $form->getValue('scf_firstname') . "<br>"; $messageBody .= "Last Name: " . $form->getValue('scf_lastname') . "<br>"; $messageBody .= "Phone: " . $form->getValue('scf_phone') . "<br>"; $messageBody .= "Email: " . $form->getValue('scf_email') . "<br>"; $messageBody .= "Legal Service: " . $form->getValue('scf_legalservice') . "<br>"; $messageBody .= "Message: " . $form->getValue('scf_message') . "<br>"; $m->bodyHTML($messageBody); if($m->send()){ print_r('send'); } } echo $form->render(); ?> </div> Email is changed. I have got some help from ai chat.