Jump to content

rick

Members
  • Content Count

    460
  • Joined

  • Last visited

  • Days Won

    5

rick last won the day on December 26 2015

rick had the most liked content!

Community Reputation

510 Excellent

About rick

  • Rank
    Sr. Member

Contact Methods

  • Website URL
    https://simulatedconcepts.com

Profile Information

  • Gender
    Male
  • Location
    Texas
  • Interests
    Web applications, scotch, hunting, fishing, scotch, graphic design. Did I mention scotch?

Recent Profile Visitors

3,566 profile views
  1. The procedure I use is: Old Server: Download the database export. Download the site folder (you can skip cache). New Server: Install Processwire (same version). Delete the site folder and Empty the database. Upload the site folder from the old host. Import the database from the old host. Empty cache and sessions. Update the config.php where necessary (database credentials, etc.). Creating a site profile is not necessary. [edit] Since all my machines are *nix based, I use rsync to maintain duplicates: rsync -azP host:source destination
  2. Please set the topic to Solved so that others aren't anticipating troubleshooting. You can edit your original post to modify the topic title. Thanks!
  3. From what I understand, you have to have the specific image prior to setting any property. $yourPage->of(false); // turn off output formatting $yourImage = $yourPage->yourImageField->last(); // get the last image // $yourImage = $yourPage->yourImageField->eq($index); // or, get specific image by array index $yourImage->yourCustomField = 'yourValue'; // Set value of custom field $yourPage->save(); // save the changes
  4. Using the API I find cumbersome having to reproduce the individual tasks in sequence that the admin performs by default when trying to accomplish the same goal. I rarely remember how to interact so I have many 'procedures' written as comments in my source to make it easier to find. The trials of old age. 😄 The original error is because of referencing the 'collection' rather than the individual item. You'll notice in that code snippet that it checks for your field maxfiles setting *and whether there is an image present. If so it removes the existing image before adding the new image to the page image object.
  5. I use a modified excerpt from @Robin S's module to add an image from a url like so: $field_value = $p->getUnformatted( $yourField->name ); if ( $yourField->maxFiles == 1 && count( $field_value ) ) $field_value->removeAll(); $pageimage = new Pageimage( $field_value, $url ); $field_value->add( $pageimage );
  6. FYI: I've been running two sites with that modification to the database without any errors or issues.
  7. Many ISPs throttle email delivery. I've had emails take up to a day to be delivered. There isn't anything you can do about their setup. This could be your email system or your client's email system or both causing the problem. You could possibly eliminate your provider by using a reputable provider, such as gmail, mailgun, etc. to send emails. You will still be at the mercy of the client provider though.
  8. @Cupacabra, It looks as though your form action (referenced in your ajax url) is not pointing to your b.php template so it is not being called.
  9. Sadly, the rider of this new horse is dumber than a truck-load of doorstops. So I found another way to accomplish what I was looking for. In my opinion, it's hacky, as I still don't know the answers to my op questions, but it will work for now. The $_FILES['input_file_fieldname']['tmp_name'] works as the parameter to New WireUpload(). The result is a randomly created name saved in both the PageImages and file system. Using Soma's rename procedure to provide the original uploaded file's name corrects that anomaly. The result is an uploaded image with the correct (human readable) name. Anyone want to buy a horse? Only ridden once. Includes a new stick. Cheap.
  10. Thanks @psy, I'll definitely try saddling a new horse. I'll miss the old horse. She was a beauty.
  11. Thanks for catching that! I've edited my original post.
  12. Howdy folks! This topic has already been beat to death here, here, here, here. I'm late to this party trying to find a stick in which to beat this horse. Good news is, I found a stick and have been flailing away. Bad news is, the horse is still dead. I am not able to save a selected image from a front-end form to a page image field using any of these methods. Here is an image representing the code (center) and dumps (Left and Right) at key positions. The temp path (Dump section 1) is created and appears in the file system. The WireUpload (Dump section 2 Left and expanded Right) show that the selected file was added to the wireupload. The $files variable assigned the execute results (Dump section 3, Left) shows an empty array was created. The $userProfile (Dump section 4) does not show details but does not include any new image saved to an images field. Another curiosity is: Notice the first line of code referencing the php global $_FILES. This is the only way to retrieve the selected image. $inputt->post('imagefield') returns null. I do not receive any error messages. The image itself is created from JQuery Filereader and is a base64 image and I can retrieve the raw data from a hidden field which shows a preview of the photo correctly. data:image/jpeg;base64,/9j/4... I've also tried the following: list($type, $img) = explode(';', $img); list(, $img) = explode(',', $img); list($type,) = explode('/',$type); $img = base64_decode($img); $img = $img . '.' . $type; I've passed the $img variable to the WireUpload function. No error is presented. The WireUpload shows the settings (filename, temp path, etc.) and an empty array as before. I'm runnin' 3.0.142, php 7.1, and apache 2.4.x So I have two questions: 1. Why is does WireUpload not return the file in an array? 2. Why does $input->post('imagefield') not return the selected file from the form. I hope that I have been detailed enough. If not, please let me know and I'll add the requested information. Thank you all for your help.
  13. Hi @JeevanisM, It is difficult to say what the problem is without having the code you are using. Based on what you describe, if the value of the phone number is not being saved from your form, then it may be something as simple as a misspelled field name. Please post your registration form code so that we can better assist you in resolving this issue.
  14. It's a good idea to limit your support request to only one category. Posting in multiple places makes it very difficult to track the progress.
  15. What does tracy debugger show: $u = wire('users')->get("name=saarun"); d($u); d($u->Phone); // dump content of your fields When you view the user while in admin, what does that page look like? By that I mean you should see all the fields for the user template and the field's current values. If the field (for example, Phone) is empty, then there is an issue with saving the data to the page. Most likely the data is not the correct format. Do the logs display any information?
×
×
  • Create New...