• Content count

  • Joined

  • Last visited

  • Days Won


rick last won the day on December 26 2015

rick had the most liked content!

Community Reputation

326 Excellent

About rick

  • Rank
    Sr. Member

Contact Methods

  • Website URL

Profile Information

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

Recent Profile Visitors

2,137 profile views
  1. Try this from ryan regarding tracking changes and notifications.
  2. Ah, ok. I knew strftime was locale aware, but not that it took into account the 12/24 hour format. Good to know.
  3. You can use the format "%l:%M %p" to display the time, without seconds. For example: $p = wire("pages")->get(some_id); echo strftime( "%l:%M %p",$p->getUnformatted($p->created)); returns a time like, 6:00 AM. I apologize if I am misunderstanding what you are wanting to achieve.
  4. I agree. I come from a very old school of IBM bookmaster coding so I still prefer the simple approach.
  5. Not sure but I seem to recall reading that either debug mode or advanced mode triggered the field name display when hovering.
  6. @heldercervantes, Completely off topic. I hope that you and your family were not damaged by the recent fires. I have a friend whose family members are still hospitalized; she is recovering from smoke inhalation and the he has severe burns he received while rescuing a dog from a burning building.
  7. require "index.php"; $admin = $users->get('admin'); // or whatever your username is $admin->setAndSave('pass', 'yo123456'); $session->redirect($config->urls->admin); @jen, something else is happening that we don't know about. Do you get any error messages? 404 page? Do y'all know the admin url?
  8. Howdy @jen, and welcome to the forums. First, you can use this RESET to gain access to the admin page. Then we can proceed from there.
  9. Valid or not, it is not commonly used and is difficult to read. Nonetheless, it appears you are creating a new password object passing confirm as a parameter. Do you have the namespace set?
  10. Howdy @AndySh, You purchased the pro version so you will need to post your request in that private support forum. If you do not have access, then please send Ryan a PM and he will give you access.
  11. Looks good! One item: The blog menu shows, Security & Privacy rather than Security & Privacy.
  12. Hi @arjen, Thanks for the reply. I have changed the code to match $this->wire() for fields, fieldgroups, and templates, and I am still getting the same results. [edit] Robin posted before I finished entering this reply. @Robin S, Thanks for the test. Yes I have to remove the orphaned fields manually when the uninstall fails to do so. I changed the uninstall to your code source and everything is correctly removed. I also left the field name and template name case unchanged for this test, but I'll change everything to lower-case to match the existing naming convention in the database. Even though the Add New Field option allows upper- and lower-case, and template names match the case of the php template file or whatever you enter for template names without a file. The only thing I can think of as to why it works now and not before is some typo present in my naming that isn't showing up in phpstorm. I agree with the lack of documentation too. I've spent three days writing this module and troubleshooting this install/uninstall oddity. I have copied so many forum topic links into module comments for my reference that it should be a book! Thanks for y'alls help. I appreciate it.
  13. Hi @szabesz, I have dissected many modules, and used the method described in the related post to gather the properties, which is how I came to create the example. The problem is that the one api-created template functions correctly while the other (with the exact same code) does not. There is something wrong, different, out of order, or whatnot, that I am missing. Of course starring at the problem for hours narrows my tunnel vision even more. I need another pair of eyes, and more time during the day. Where does that line form? haha
  14. I have a problem that is making my hair even more gray. I am writing a process module which constructs seven fields and two templates as shown in this excerpt: /** *** Process Module Install *** * * The following seven fields are created successfully. * No other field attribute nor context is yet defined. * */ public function ___install() { if( !$this->fields->get('field1') ) { $f = new Field(); $f->name = 'field1'; $f->type = $this->modules->get('FieldtypePageTitle'); $f->label = __('Title', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } if( !$this->fields->get('field2') ) { $f = new Field(); $f->name = 'field2'; $f->type = $this->modules->get('FieldtypeText'); $f->label = __('Text', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } if( !$this->fields->get('field3') ) { $f = new Field(); $f->name = 'field3'; $f->type = $this->modules->get("FieldtypeTextarea"); $f->label = __('Text', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } if( !$this->fields->get('field4') ) { $f = new Field(); $f->name = 'field4'; $f->type = $this->modules->get("FieldtypeImage"); $f->label = __('Image', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } if( !$this->fields->get('field5') ) { $f = new Field(); $f->name = 'field5'; $f->type = $this->modules->get('FieldtypePageTitle'); $f->label = __('Title', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } if( !$this->fields->get('field6') ) { $f = new Field(); $f->name = 'field6'; $f->type = $this->modules->get("FieldtypeTextarea"); $f->label = __('Text', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } if( !$this->fields->get('field7') ) { $f = new Field(); $f->name = 'field7'; $f->type = $this->modules->get("FieldtypeImage"); $f->label = __('Image', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } /** * Template1 name displays correctly in Setup > Templates. * Template1 shows three assigned fields. * Template1 shows assigned fieldgroup. */ if( !$this->templates->get('Template1') ) { $fg = new Fieldgroup(); $fg->name = 'Template1'; $fg->add( $this->fields->get('field1') ); $fg->add( $this->fields->get('field2') ); $fg->add( $this->fields->get('field3') ); $fg->save(); $t = new Template(); $t->name = 'Template1'; $t->fieldgroup = $fg; $t->save(); } /** * Template2 name displays correctly in Setup > Templates. * Template2 shows zero (0) assigned fields. * Template2 shows assigned fieldgroup. */ if( !$this->templates->get('Template2') ) { $fg = new Fieldgroup(); $fg->name = 'Template2'; $fg->add( $this->fields->get('field4') ); $fg->add( $this->fields->get('field5') ); $fg->add( $this->fields->get('field6') ); $fg->add( $this->fields->get('field7') ); $fg->save(); $t = new Template(); $t->name = 'Template2'; $t->fieldgroup = $fg; $t->save(); } } /** *** Process Module Uninstall *** * */ public function ___uninstall() { $t = $this->templates->get('Template1'); if( $t ) { $this->templates->delete( $t ); } $fa = array( 'field1', 'field2', 'field3', 'field4', ); $fg = $this->fieldgroups->get('Template1'); if( $fg ) { // also tried with, $fg->count > 0, ... foreach( $fa as $f ){ // ...and, $fg->items as $f, without $fa array $df = $this->fields->get( $f ); $fg->remove( $df ); $fg->save(); wire('fields')->delete( $df ); } $this->fieldgroups->delete( $fg ); } $t = $this->templates->get('Template2'); if( $t ) { $this->templates->delete( $t ); } $fa = array( 'field5', 'field6', 'field7', ); $fg = $this->fieldgroups->get('Template2'); if( $fg ) { foreach( $fa as $f ){ $df = $this->fields->get( $f ); $fg->remove( $df ); $fg->save(); wire('fields')->delete( $df ); } $this->fieldgroups->delete( $fg ); } } The installation is partially successful in that it creates all seven fields as I have them defined and displays them in the fields list. The two templates are created and display in the templates listing. However, only the first template (Template1) has the three assigned fields listed on the basics tab. Template1 does not list any fields. The next issue is during uninstall. The templates and fieldgroups are removed, but the fields are not. There are no errors in the ProcessWire logs, dev console, tracy, or my server logs. I'm running php7.0, blank ProcessWire 3.0.62, and MySQL 5.0, apache 2.4, on localhost. Can someone offer a suggestion as to what I should be doing differently?
  15. @Dinodog, This doesn't appear to be a ProcessWire issue. However... The error is displayed from this div element located just after the closing form element: <div id="error" class="error box"> Something went wrong, please try again later. We truly apologize for the inconvenience. </div> This indicates that the javascript validation function is failing causing this div element to become visible (rather than the success message). The validation is failing for some reason, either improper user input, or a bug in the code. The form contains this hidden element which gets submitted with the other form data: <input type="hidden" name="recipients" value="developer2@puredataconsulting.com, stay@reeflodge.com.au, designer@puredataconsulting.com" /> Do you get any emails at the stay@ address? Also, the two references to pure data suggests two things. First, pure is the company that produced your web site, and two, they also get copies of all your confirmation emails (why?). Are there any error entries in your server logs which might indicate another cause? Such as the email routine? If so, please post back with that information so we might be able to help further.