Jump to content

Jonathan Lahijani

Members
  • Content Count

    361
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Jonathan Lahijani

  1. Tis the season to clean out the mechanical keyboard (first time in 7 years)...
  2. I just ran into this issue which occurred as a result of some server upgrades not going smoothly. The fix in our case was to run: apt-get install php-mysql If you end up getting this error, it wouldn't hurt to try installing PW from scratch in a separate directory. PW's installer identifies where potential issues are, such as missing packages, which is very helpful. Sometimes it is not so apparent from php.ini, phpinfo() or error logs.
  3. I have a spare computer laying around so I did a fresh install of Windows and installed Laragon. I must say, it is very slick, feature rich and I can understand the appeal... it just works and has a lot of useful magic (such as auto virtual hosts and easy SSL setup).
  4. With the default settings, running this: echo $page->image->render(["srcset" => true, "uk-img" => true]); Outputs this: <img src='/myprocesswire/site/assets/files/1/la1.jpg' alt='' data-uk-img data-srcset='/myprocesswire/site/assets/files/1/la1.320x569-srcset-hidpi.jpg 320w, /myprocesswire/site/assets/files/1/la1.640x1138-srcset-hidpi.jpg 640w, /myprocesswire/site/assets/files/1/la1.768x1365-srcset-hidpi.jpg 768w, /myprocesswire/site/assets/files/1/la1.1024x557-srcset.jpg 1024w, /myprocesswire/site/assets/files/1/la1.2048x1115-srcset.jpg 2x' sizes='(orientation: portrait) and (max-width: 768px) 50vw'> Notice how "src" is not "data-src" as per UIkit's documentation: https://getuikit.com/docs/image#srcset As a result, according to Chrome DevTools network graph, 2 images are loaded as in the attached screenshot. Shouldn't 'data-' be added to 'src' in UIkit mode?
  5. The weekly blog had it here: https://processwire.com/blog/posts/processwire-2.6.18-updates-pagination-and-seo/#new-http-prefix-available-for-all-config-gt-urls-properties In the API: https://processwire.com/api/ref/paths/ Easy to miss this one.
  6. I just found this developer oriented browser which has me excited: https://sizzy.co/ I'm about to play around with it but wow, it looks like it could increase my productivity quite a bit!
  7. That code seems correct. Are any of the post pages in-fact published, because if not, you'll need to add 'include=all' to your selector: $pages->find('template=lvl04-post, limit=5, include=all');
  8. I was literally suggesting FullCalendar as you replied. It's a great option. You just need to provide it with the JSON it needs and it works quite well.
  9. Excellent update. One minor nitpick about the overrides tab. When a field has been added to a RepeaterMatrix, can you have it show the Matrix Type Name (such as "gallery") instead of (or in addition to) the Matrix Type ID ("matrix4"). It would be much clearer that way.
  10. I want to prevent the creation of a field named 'fake'. What would be the correct hook in ProcessWire to do this?
  11. @NoremPload ProcessWire 3.0.142 (which is a dev version and very recently released) brings in the ability to have custom fields for images. I personally had some issues with this ImageExtra plugin and stopped using it a while ago (it's been a few years). Also the author is no longer working with ProcessWire so there's also that. I'd recommend putting in the extra work to do it the new, native way: https://processwire.com/blog/posts/pw-3.0.142/
  12. <?php namespace ProcessWire; class MyCoolModule extends WireData implements Module, ConfigurableModule { public function __construct() { $this->myvar = $this->wire('pages')->get(2)->name; // problematic for some reason } I have the above code in my module. However it throws this error: Fatal error: Uncaught Error: Call to a member function get() on null. Why is this the case?
  13. One work-around is to use this package, which I've used with success: https://github.com/tijsverkoyen/CssToInlineStyles
  14. Related: https://github.com/processwire/processwire-issues/issues/928
  15. This doesn't seem to be a problem with PW 3.0.140 as far as I can tell.
  16. I experienced this issue and the fix was related to JavaScript loading order.
  17. I see that if I enable auto-join for the field, then it circumvents the issue. So that's one solution.
  18. I have a Page field and in ProcessWire, I can get values from it like this: $page->my_page_field; // returns the ID $page->my_page_field->title; // return the title Given my particular situation, I'm hitting an infinite loop as I documented here a few years ago: https://github.com/ryancramerdesign/ProcessWire/issues/1962 Is there a way to ONLY get the raw ID of the assigned page without ProcessWire getting all the attributes of that page leading to the loop?
  19. If the field being hooked is inside of a repeater, how can I get the repeater's page id?
  20. I don't use a Mac but I've heard great things about Quiver: https://happenapps.com/
  21. I'm using this now on a site that needs that extra level of metadata. It's working great. Thank you.
  22. https://craigmod.com/essays/fast_software/
  23. https://blog.theodo.com/2019/07/vscode-php-development/
  24. I'm looking to improve my editor (VSCode) in a way whereby it will tell me the value of a ProcessWire setting() value that's been defined in another file as I write an override setting. Let's say I have a file called /site/templates/settings-default.php with the following: setting("my-div", "my-default-class"); And I have another file called /site/templates/settings-override.php with the following: setting("my-div", "my-override-class"); As I'm writing that specific line in "settings-override.php", is it possible through some sort of auto-suggest / intellisense for it to tell me the value of the setting in "settings-default.php" so that it provides context in realtime as I write the override setting? This would prevent me from having to switch between the two files in my editor and improve my workflow. Any suggestions would be appreciated.
×
×
  • Create New...