Jump to content

Jason Huck

  • Posts

  • Joined

  • Last visited

  • Days Won


Jason Huck last won the day on June 17 2021

Jason Huck had the most liked content!


Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

3,522 profile views

Jason Huck's Achievements

Sr. Member

Sr. Member (5/6)




Community Answers

  1. Hello everyone, We're looking for someone to join our team full time as a User Experience Developer. This role is about evolving our UI design system in HTML/CSS/JS as we continuously improve our web sites (built on ProcessWire of course!), email marketing, and other digital channels. The ideal candidate will be a creative thinker who also understands how design choices impact SEO, performance, accessibility, and standards compliance. It's a great company (70+ years old, multi-generational family owned) with excellent pay and benefits, and we are remote friendly. Get more info and apply here: https://mchl.mn/uxd Thanks, Jason
  2. FWIW, we needed to preserve query string parameters (mostly UTM params for campaign tracking) with a lot of permutations, and after trying a few different things, we ended up adding this bit to init.php. It seems to be working well for our particular use case. // Hook the 404 routine to catch valid URLs with UTM params. $this->addHookBefore('ProcessPageView::pageNotFound', function($event){ // Get the originally requested URL and its query string. // $_SERVER['QUERY_STRING'] is not reliable in this environment. $source_url = parse_url($_SERVER['REQUEST_URI']); $source_path = $source_url['path']; $source_querystring = $source_url['query']; // Do nothing if there is no query string. Jumplinks can manage that. if(!isset($source_querystring)) return; // See if we have a jumplinks entry for the source path WITHOUT the query string. $db = wire('database'); $source_string = trim($source_path, '/'); $sql = "SELECT source, destination FROM process_jumplinks WHERE source = '".$source_string."/?'"; $result = $db->query($sql); $match = $result->fetch(\PDO::FETCH_ASSOC); // If any matches are found, try redirecting to it, appending the original query string. $target = $match['destination']; if($target != ''){ // is this a path or a page ID? if((strpos($target, 'page:') !== false)){ $id = (int) ltrim($target, 'page:'); $page = wire('pages')->get($id); $target_url = $page->url.'?'.$source_querystring; }else{ $target_url = '/'.str_replace('{!all}','',$target); $target_url .= '?'.$source_querystring; } // wire('log')->save('querystrings', 'Source: '.$source_path.', Target: '.$target_url); wire('session')->redirect($target_url); } }); Maybe others will find it helpful.
  3. Thank you @teppo - that's exactly the sort of thing I was after. - jason
  4. Hi, Has anyone created descriptions for the cookies set by ProcessWire for use in privacy policies? I see two at the root level -- wires and wires_challenge. Would love not to reinvent the wheel. I could turn them off on the front end for non-admin users, but would rather have them covered in case we add features later where they are needed. Thanks, Jason
  5. Well, I don't understand why, but saving the title in a discrete operation separate from other fields seems to work. In other words, this works for everything except the title: $product->of(false); $product->foo = 'bar'; $product->baz = 'yadda'; // ...etc... $product->title = 'hmm'; // does not work $product->save(); Whereas this seems to work for everything including the title: $product->of(false); $product->foo = 'bar'; $product->baz = 'yadda'; ...etc... $product->save(); $product->setAndSave(title', 'hmm'); // works fine
  6. Hi kixe, Yes, I am turning output formatting off prior to the changes, and saving after making them. It does make me wonder if there is some other part of the routine that is overwriting the changes, though, so maybe I will separately set the title at the very end -- in its own save operation -- to see if that makes any difference. Thanks, Jason
  7. We have a routine that imports product data from an external source and adds, updates, or deletes pages as needed. We've realized that existing page titles aren't being updated. The page name and other fields get updated, including a custom field that we set up to be identical to the title field. The title field is a TextLanguage field. There is currently only the default language (English). Is there some special step you have to take for page titles, multilingual or otherwise? I've done similar things in the past and don't ever recall having this issue. I've tried each of these to no avail: $product->title = $productTitle; $product->set('title', $productTitle); $product->title->setLanguageValue(wire('languages')->get('default'), $productTitle); $product->title->setLanguageValue(wire('languages')->get('english'), $productTitle); Thanks, Jason
  8. Perfect! Exactly what I needed. Thank you!
  9. I'm customizing some search results and have to explicitly reset the values for the start and total on each page. I've got it all working except I'm not sure how to detect when I'm on e.g. /page2/. I tried $input->urlSegment1, but it's empty. I'm sure there's an easy way to grab the current page value when pagination is in use? Thanks!
  10. Just to follow up, I discovered that there was no entry in the fieldgroups_field table linking the missing field to the admin template. I manually added a record there, re-saved my custom page, and now it's working as expected. I am concerned about how the db got into this state in the first place, but I don't think this module is to blame. Thanks, Jason
  11. I have used this module successfully in the past, but am having trouble getting it to work properly in PW 3.0.123. The module installs without error and I can create an admin page (using the admin template and the correct "Process."), but the FieldTypeAdminCustomPagesSelect field never shows up on the page. (The field is defined in the fields table.) I manually entered a value in field_acp_template to try and circumvent the issue, but it's not finding the template file. What else should I check? Any ideas? Thanks! Jason
  12. My company is hiring two full time positions that might be of interest to members of this forum as we build out our UX team. Among other things, we will be migrating a number of sites over to ProcessWire, developing a UI pattern library, and establishing a continuous improvement process for them. Lots of front end work but also some API development, PDF generation, and other fun stuff. These are multilingual sites (currently English, German, and Chinese, more languages to come) for a global company, but these positions are on site in our Cincinnati, Ohio corporate HQ. For more information, or to apply, see the following links: Web Developer http://www.michelmancareers.com/Opportunities/Americas/?gnk=job&gni=8a7880665cc36d5a015cc69d9b170b1e Digital Designer http://www.michelmancareers.com/Opportunities/Americas/?gnk=job&gni=8a7880665cc36d5a015cc69aa93008dc Thanks, Jason
  13. This seems to work just fine with PW 3.x, by the way. Thank you to the author!
  14. @gRegor I never did get it working on that project. It's still running PW 2.7.x. It wasn't that critical so I just let it go.
  15. Just to close this out, there turned out to be multiple, unrelated issues. The 404 on the front end was due to a coding error on my part. The upload issue on the back end was due to missing support for iconv and imagick. All sorted now.
  • Create New...