• Content count

  • Joined

  • Last visited

Community Reputation

6 Neutral

About chcs

  • Rank
    Jr. Member

Profile Information

  • Gender

Recent Profile Visitors

153 profile views
  1. chcs

    Setting 'autoload' => true in the module info worked. Thanks!
  2. $field->template_id = $this->templates->get("mm_state")->id; That worked! Thanks
  3. After running this code in my module's __install() the template_id is not set. Any ideas why? (The export contents from the template created and the one that I built with Admin are the same. Both exports have the template_id is set to mm_state. When I go to edit the field in Admin, the template is not showing on the Input tab and it doesn't show the template title on a page using the template that uses this field. Using processwire 3.0.98) // mm_state $field = $this->fields->get('mm_state'); if (!@$field->id) $field = new Field(); $field->type = $this->modules->get("FieldtypePage"); $field->name = 'mm_state'; $field->label = 'State'; $field->derefAsPage = 2; $field->inputfield = "InputfieldSelect"; $this->fields->save($field); $field->labelFieldName = 'title'; $field->template_id = 'mm_state'; $field->columnWidth = 100; $field->required = true; $this->fields->save($field);
  4. It seems that the confirm field in this module get it's id based on the name attribute instead of the id attribute . So if one changes the id attribute to a value other than the name, the confirm input id is not effected. I consider this a bug. In the module that I am developing I have multiple tabs with forms in multiple tabs. This causes id duplication when using the InputfieldPassword field on two different tabs. I can get around the problem by specifying the id for the field, but in the case of the InputfieldPassword field, it bases the Confirm id attribute on the name attribute instead of the id attribute. I am using ProcessWire 3.0.98 and have attached the modified module (see lines 209 and 241) InputfieldPassword.module
  5. chcs

    I put the following code into our membership module but it does not seem to redirect. Any ideas why? Thanks. public function init() { parent::init(); // set landing page $this->addHookAfter('Session::loginSuccess', null, function($event) { if (!$this->wire('user')->isSuperuser()) { $path = $this->wire('config')->urls->admin . "membership/"; $this->wire('session')->redirect($path); } }); }
  6. @kixe Thank you for responding. Perhaps we need a broader understanding of what is involved? The module we are developing is client-specific, and is not really applicable to the broader community, so registering at doesn't seem to make sense. So it seems we would need to create a private module feed to keep these modules up to date across sites? Is there documentation on that, or is there an alternative that will scrape the module code of a private repo to generate it? Your first solution regarding changing the moduleServiceUrl to this private feed, would that unhook the site from for core updates and free-use plugins? Thank you again for replying and helping us work through this.
  7. chcs

    I would like to be able to to specify an admin page that the user lands on based on their role. I would also like to be able to specify this landing page when automatically logging on using the API. Any ideas are welcome.
  8. I am trying to figure out the best way to handle developing a module for multiple private ProcessWire sites. The key issue being: when I update the module, how can I elegantly get the changes in the sites that use it. It would be nice to not have to copy/ftp the files from site to site, or entangle them in git history (maybe as a sub module?) The ProcessWire modules directory has a nice upgrade module which can elegantly notify/click+upgrade publicly hosted repos. But this would be private code hosted on a private repo. I assume this would preclude it from being hosted there? Can someone point me to a solution for this, or perhaps brainstorm any possibilities.
  9. @Robin S perfect solution thank you so much! @OLSA very good to know another way to tackle the issue, thank you.
  10. Oh I didn't see that option in ASM, I've been using the typeahead. Not a bad, but requires a save before one can edit.
  11. In the page reference field, one can create new pages if they enable that option. However, the "new" page only gets the title field filled out. Q: Is there a way to expand on this so a user can fill in more fields from the new page? Either in-line or via modal?
  12. Reporting back to confirm that it was a max_input_vars issue. Once changed locally, the pages saved as expected. As well, once changed on the production server, the clone and original began to save again.
  13. I've now gone ahead and exported the whole site to test on a local environment. when i save i get the following (php?) error (warning?) in the top of the page @wbmnfktr in response to you: 1. no js errors 2. no PW log errors 1. not sure how to refresh all modules? i'm scared of losing data (eg if i unload the repeater module) 2. i've nuked all compiled files 3. i've logged out and in.. 4. it's not a cache issue because i've used incognito windows and chrome dev and other browsers 5. same issue firefox/edge 6. same as #1 nervous about losing data 7. i don't have any custom hooks for back end stuff. it's pretty stock.
  14. I have a page with a good amount of fields on it, I have many other pages in the same template that have no issue, but one particular page just doesn't save changes to any of the fields. I installed the clone page module, cloned the page, and everything cloned fine... but still when i try to make changes to the clone nothing saves either (just like the original page). I expect some kind of notification to show up saying it saved, or not, but i get nothing as if the page reloaded fresh. The failure is silent, and there's nothing in the logs to direct me. This is a real head scratcher and I'm not sure how I should go about troubleshooting it further. Can someone help? Thank you kindly.