Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

13 Good

About chcs

  • Rank
    Jr. Member

Profile Information

  • Gender

Recent Profile Visitors

431 profile views
  1. chcs


    This has been resolved. The issue was with the WHM firewall.
  2. chcs


    We'd like to send email from WireMailSMTP using G Suite. Google offers three different options: https://support.google.com/a/answer/176600?hl=en We've tried every variant we can, without success. For anyone using G Suite, which Google option works for you? What settings have you used in G Suite admin, and which settings have you used in the WireMailSMTP config? (We have enabled the "allow less secure apps" option, and are not using 2-factor authentication.) Your help is much appreciated.
  3. This seems to have been caused by a database issue. It's been resolved,
  4. We moved a processwire site from backup to a new server. When we try to load the homepage we get an internal server error. We are unable to log into the admin. Some of the site template files seem to be loaded and shown in the output but we have no ability to log into our /admin or generate any front end content that isn't an error message or 404 site/assets/logs/ exceptions.txt --- 2018-10-05 20:31:59 guest http://www.website_name_here.com/http404/ Template 'home' is used by the homepage and thus must manage access (in /wire/core/Templates.php line 146) errors.txt --- 2018-10-05 20:31:59 guest http://www.website_name_here.com/http404/ Error: Exception: Template 'home' is used by the homepage and thus must manage access (in /home/user_account_here/public_html/wire/core/Templates.php line 146)
  5. I definitely understand the line one has to draw when making assumptions for the user, but it seems that in some instances you do make those assumptions already -- which is why those properties of the object feel really inconsistent and confusing. I think that issue is driving some of the posts in this thread that ask about those properties and why they don't seem to output what we expect. Depending on whether it's a one time event, an all day event, or a recurring event, they behave a bit differently or in unexpected ways. It's almost that I would prefer you to make a consistent assumption, but provide the tools to make an alternative output for myself. Right now it seems that the implementation relies much more heavily on simply understanding what I need to do to get the simple output that I expected to get. It's not an easy question to answer, but I hope you have an understanding of where I (and others?) see the confusion. The admin field, screens, and some of the tools you provide are very slick... but the object for custom output is harder to figure out, or simply not that useful depending on the nature of recurrence (or not). Thanks!
  6. @joshuag I did use that, I know the post was a bit verbose but it listed all the steps I took and all the problems I found using recurme in three different event/date scenarios I see, but it leads to an issue when you get to an event page. Let's say ROCKBAND is in town and they are playing 4 nights in a row. On the "events" page you see the 4 dates, and click one of them. As a user you now expect to ge to the event page to get details for the date you clicked... the question becomes how do I output "ROCKBAND, Super Arena, October 3, 2018 8pm" as that is what the user clicked on from the calendar. If it was used internally I'd expect $recurme->event($page)->date to properly output the string, but it doesn't. There is thus no elegant way to access it from the object, requiring us to check for the get string and handle it ourselves, correct? Effectively it makes the ->date property inaccurate and makes me question why I would ever rely on it and why it exists in the first place. Since the recurme object is generating the calendar, and making the link, and then hopefully getting the date data when I generate the output.. I would expect it to handle it rather than adding my own logic in.
  7. Hi @joshuag we're having some problems. Background info, we have an "event_date" recurme field on the "event" template. Simple case studies, I have three event pages. start_end - a one day event with a start and end time all_day - a one day, all day, event three_days - a recurring event that has a start/end time, repeated every day for three days in a row. oddity #1 - "data" when you land on their respective pages, <?= $page->event_date; ?> yields a json object (expected). the "dates" key in that object is populated with an array of three dates for the three_days event. however, with the other two pages where you'd maybe expect one date in the array, there's hundreds, stretching for about eight years. https://pastebin.com/1URSn6pF oddity #2 - $event->start_date as noted in the documentation, one is expected to get the event data using $event = $recurme->event($page); Now that we've acquired the recurme event object, I would expect access to the date of the event once the user is on the page of the event. start_end <?= var_dump ($event->start_date); ?> == NULL all_day <?= var_dump ($event->start_date); ?> == NULL three_days <?= var_dump ($event->start_date); ?> == int(1534968000) The first two single day events being expected to return a result considering there is only one set. The null problem extends to other properties of $event, eg: *->orig_date, *->date, *->month, etc. with the expected strings only existing in the recurring event page. working off this problem... oddity#3 - $event->start_date for recurring events Your $recurme->renderCalendar() or $recurme->renderList() methods render links for the event pages, and taks on a querystring which seems to indicate the start date of the events. However, like the above, the start_end and all_day pages, with querystrings still yield nothing when trying to extract the date conveniently from the $event object. Furthermore, with recurring event three_days is on the 22nd of august, 23rd, and 24th. Landing on the the page, with its respective querystring, yields the wrong date. for example: foo.com/events/three_days/?date=1535140800 One would arrive at the above page from clicking through from the rendered list, or rendered calendar. However, now echoing the date for the event <?= var_dump ($event->start_date); ?> you would expect to see the integer/date strings for the august 24th date, but you actually get the original from aug 22. This problem extends into all the respective strings. eg: foo.com/events/three_days/ <?= $event->date ?> == "Aug 22, 2018 @ 1:00 pm" foo.com/events/three_days/?date=1534968000 <?= $event->date ?> == "Aug 22, 2018 @ 1:00 pm" foo.com/events/three_days/?date=1535054400 <?= $event->date ?> == "Aug 22, 2018 @ 1:00 pm" foo.com/events/three_days/?date=1535140800 <?= $event->date ?> == "Aug 22, 2018 @ 1:00 pm" The first two being expected/correct. The latter two I would expect to be Aug 23 and 24 respectively considering these links were generated through the calendar. --- I'm not sure how to proceed exactly. Certainly I can jump through some hoops on my own end and grab the query string if it exists, or output arrays of dates if it doesn't, and parse json for single day events with no recurrences... but it seems like I am spending more time testing and debugging contingencies than having the field work in ways I expect it to. Is there maybe something I can do to think about this in a different way, or perhaps some sort of new version (i'm using 1.0.3 and a new dev version of PW)? Thank you!
  8. Setting 'autoload' => true in the module info worked. Thanks!
  9. $field->template_id = $this->templates->get("mm_state")->id; That worked! Thanks
  10. 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);
  11. 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
  12. 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); } }); }
  13. @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 modules.processwire.com 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 modules.processwire.com for core updates and free-use plugins? Thank you again for replying and helping us work through this.
  14. 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.
  15. 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.
  • Create New...