-
Posts
17,232 -
Joined
-
Days Won
1,700
Everything posted by ryan
-
Repeater pages are just another type of Page so it should work fine to use the $page->if() when $page is a repeater item. Using an $page->if('repeater_field', ...) when $page is a Page that has the repeater field on it will also work since RepeaterPageArray is a type of PageArray. Though let me know if you were thinking of something different.
-
This week we take a look at what’s in ProcessWire 3.0.126 which focuses largely on resolving issue reports, but also includes a handy new $page->if() method— https://processwire.com/blog/posts/pw-3.0.126/
- 6 replies
-
- 16
-
-
-
This week we take a closer look at the upcoming ProMailer module with a lot more details and screenshots. Plus an update on next steps with the new website and development schedule in the weeks ahead— https://processwire.com/blog/posts/promailer-preview/
-
- 13
-
-
@Robin S Good point, I need to update that phpdoc in that file and will. I think it'll be more convenient for users if I keep it up to date with Sanitizer, rather than removing it completely. At least I like my code editor being able to recognize them as function calls rather than errors. As far as I know, there's not anything we can do phpdoc-wise to cover instruction methods (like text50_entities), since there's basically an infinite possible combination of them. Though will be translating the blog post into regular documentation for these new additions.
-
Feel free to keep reporting here. I am checking in here for errors like this every few days and then fixing them as they come up. I'm guessing not too many more of these will turn up, as I've been continuing to update the logic in our 404 hook, plus logging 404s in ProfilerPro to catch any others that might have been missed.
-
ProcessWire 3.0.125 has several useful new $sanitizer methods and options, as well as new ways to access them directly from the $input API variable. This makes dealing with user input even easier than it was before. This version also brings updates to our translation functions and improvements to our API documentation: https://processwire.com/blog/posts/pw-3.0.125/
- 19 replies
-
- 14
-
-
If you've got the Android File Transfer app installed, try removing it. After upgrading to Mojave here, I was getting constant disconnects on bluetooth, which might have been the same with WiFi. After several days trying everything, finally uninstalled Android File Transfer and then no more problems. Still missing having the convenience of that app, but it really was screwing things up. Surprisingly runs just fine on my MBP, though I've not yet upgraded that to Mojave, so that's probably why.
-
I'd planned on writing up a blog post today and bumping the PW version up to 3.0.125, but working on documentation pages ended up taking up most of the day. My hands are getting a bit tired from all the writing, so I'll keep this post short. ? I'll have a more formal post with more on the 3.0.125 version next week. People have been asking for more information on the various ProcessWire API access methods, as well as more information on the Functions API. I've written up a new documentation page that covers all the details. Though it's become a bit long, so next week I might split off the Functions API part into a separate child page. But for now, this is what I've got—the new documentation page is located here: https://processwire.com/docs/start/api-access/ In addition, the ProcessWire API Explorer module has been updated to support documentation for ProcessWire's procedural functions this week. And as a result, our online API documentation page now covers them all too. I spiffed up the phpdoc on all of them (and in some cases re-wrote the content) in preparation for that. For those that were asking for more documentation on the API functions, this page also has a section dedicated for those. Here's a direct link to our more than 50 procedural functions available in PW that previously didn't have any online documentation: https://processwire.com/api/ref/functions/
- 13 replies
-
- 21
-
-
-
This is not what I'm saying. You seem to think this is something complex, but I think that's because you are used to something different. New users will not already be used to something. What I'm suggesting is actually much simpler than you think, and is more specific and clear than using exclusively $var or var(). Please wait and see what I write up this week, and I think it'll make sense. Like I mentioned earlier, if you fully understand it and still don't agree about the benefits, then I'll reconsider, but for now trust me on this. I would agree if we were showing $pages and pages() in the same set of examples, or $page and page(). But we are not. The examples don’t state “this is from a template file” or “this is from another script”, or any number of other contexts you could access PW’s API from. There’s plenty of cases where this call will work exactly as-is. If you are in a context where it won’t, it even specifically tells you what you need to do: call $page->of(false); first. Any 1-line example could work in one context and not another, that's the nature of it. In this brief set of intro examples it's important that we show not just getting data, but also saving it—wouldn't you agree? Yet setAndSave() is an advanced call, there for people that know what they are doing with regards to output formatting. It's not something to put in a beginner example because it's not for beginners. It’s important to learn what output formatting is before you start bypassing it. So I’m a little shy about a setAndSave() call here, plus I think it’s kind of a unique one-off in PW’s API, so not a general API example to communicate the underlying flavor of the API. And these examples are trying to communicate the overall flavor of the API, something to get you interested enough to explore further. In the examples we also refer to floors, height, year, email. Immediately under the examples it states “All fields in ProcessWire are custom fields that you easily define and edit in the admin.” This is what the examples are showing, and this is actually a pretty important point of the homepage. The fields you access from a page are entirely your own and you configure them how you want. If this is something that causes one confusion, then that would be a good confusion because it's revealing a key "aha" point. If this is something that sends one packing, then they didn't get it and are likely looking for something different than what PW is, which is also fine. But my preference is not to present examples that imply a fixed-field system, because that is the opposite of what PW is. Ah okay, thanks, I'll revisit and test it out again for those elements.
-
It's been mentioned a couple of times. I think functions API should lead the examples, but I understand the concern. Per the mention in last week's post, I'll be writing up all the details this coming week. Take a look, and if I haven't convinced you guys at that point, I'll be happy to change the examples. The only thing is, we'll probably need to come up with new examples because they get too long without the functions API. And at that point, they no longer serve the intended purpose at least on the marketing aspect. Favicons now added. The same could be said of using an API variable inside of a function or method. These are short examples to get you interested, they lack surrounding context regardless of what style API you are using with PW, and there will be cases where they work and where they don't either way. We're just trying to give people a small sip to see if it tastes good, not show them how to brew the beer. However, with that said, the intention is that they will work out of the box. They do work on the dev branch right now (which is the branch we recommend for new installs). This will also merge to master again soon. The examples have always worked on the core Regular site profile as well. Error messages have also been added to detect when you use a functions API call without them enabled, and it then tells you exactly what you need to do to enable it. As far as the core goes, the values set in /wire/config.php have to be settings that work on all existing installations. Whereas the values set in /site/config.php are those intended for new installations. We can't enable the functions API on existing installations—only new installations. The reason is that someone may have defined their own pages() function (for example) years before we even had a functions API, and upgrading to a version of PW that has it pre-enabled would then break their installation. I make an effort to ensure anything that gets added in PW is done so in a backwards compatible manner, and this is why there are properties like $config->installed and independent config files. The mix of approaches is actually relevant here because anything using a function refers to something where only one instance can exist, and anything using a variable refers to something that can have any number of instances. So I would use a variable like $page in an example when the intention is to say "can be any page", whereas I would use page() when the intention is to say "page being viewed", as there can only be one. That is one benefit, but definitely not the only one. Read what I have to say later this week. Context is important here and the statement above skips that. I'm recommending the functions API for front-end templates, where PW manages the instance for you. But this is also where our audience is going to be 99% of the time. Of course if you are developing modules, then neither pages() or $pages is right for you, as you are going to need to ask for them from $this. I'm not trying to appeal to module developers, they already have a good handle on this stuff. I went back and forth on this one a couple weeks ago, but settled on the centered version after a lot of testing. Centered felt much more balanced, perhaps because the lines are so short that all the weight ends up on the left side. These are just short snippets of text, but if it were any longer then no doubt we'd want to go left aligned. Good one and I agree. I think Robin S. also mentioned this if I recall, and I do have it on my list to add this capability. Uikit 3 doesn't come with an autocomplete component (Uikit 2 did), and we don't have one to use from jQuery UI like we do in the admin (since not using jQuery UI on this site). So the current autocomplete search is completely homegrown. I don't really know how to add the arrow key nav to this at the moment but do plan to hopefully figure it out soon. Between the existing wire highlight pointer, and the existing darkened text, and then add on that the text usually matches that of the headline, to me this just seems like way too much emphasis and redundancy if we also add a color change to it as well? At least my opinion is I don't want my eyes to be drawn to that unless I'm specifically looking for it.
-
Check your /site/config.php file. There is a $config->userAuthSalt salt value present there and it would need to be identical between the two installations, otherwise the two installations are hashing passwords differently. That's usually a good thing, but in your case where you want the existing logins to work, you would want to keep that userAuthSalt value.
-
@Robin S The download versions should be showing now.
-
Yep, I've got profilerpro monitoring them and if any url gets more than a couple hits then I add a redirect. It looks like there were a few I missed but slowly accounting for them as they pop up.
-
In this week’s post, we’ll take a look a look at the new website and focus on some parts of it and how they were built. Then we’ll dive into the latest version of ProcessWire on the dev branch, version 3.0.124— https://processwire.com/blog/posts/pw-3.0.124-and-new-site/
- 8 replies
-
- 18
-
-
-
The old logo is back due to popular demand. I've never liked the way it looks next to the newer mark, but reducing the brightness of the word "Process" seems to help a bit, so I think it works for now. The issue with the overlapping dropdown should be fixed now, please let me know if anyone else is still seeing it. You might have to double-test in Incognito mode if you do, just in case something is stuck in the cache. I agree with Adrian's points on Tracy, and also I wouldn't know how to maintain it if he ever decided to go meditate in a cave in India for a year. But I also agree about how useful and important Tracy is and that we should give her first class treatment around here and make it as easy as possible for people to make it a part of their installation. Perhaps the core modules install screen has an "Install Tracy" button, or special site profile, or maybe PW's default error messages could suggest Tracy as an option for additional developer help, etc. I think the example is fine because it just depends if output formatting is on or off. And if it's on, it'll give you an error about what you need to do. The purpose of those examples on the homepage is not to provide a full start-to-finish API workflow, but it's to show some interesting snippets to what's possible in 1 line of code. This is more about marketing than it is about serving as documentation, though of course they are good examples too. Regarding use of $pages vs pages(), I had thought we had it enabled in all the site profiles by now, but it turns out it was in the newest one but not the older ones. I'm updating the older ones so that it is enabled by default. I'm also updating the error handler so that if it detects you are trying to use the functions API but the $config->useFunctionsAPI is false, it replaces the "undefined function" error message with a "you need to enable the functions API and here's how..." message. Tracy actually got me thinking of this because I mistyped something and its error said something along the lines of "did you mean [alternative-function]" (not sure of exact wording) and I found that incredibly helpful. It's showing up for me. It's just there's a lot of stuff with the word "find" in it, so you just have to click on the view-all link. This is actually how we make it possible for that footer to be always up-to-date with the forums, Twitter, etc., even if the rest of the page is on a 1-day (or 1-week) cache via ProCache. It uses Uikit's scrollspy to automatically load the footer via ajax from a separate page that is on a 60-second cache, but only if you actually scroll to it. In this manner, we're getting full cached delivery, and a fully up-to-date News/footer section when/if you scroll down to it.
-
@matjazp @tpr Thanks! That did it. I know I can edit SVG files as XML but didn't know anything about what changes would be necessary to accomplish anything like this, so I appreciate it.
-
@matjazp or anyone else that might know — I don't have a tool that can edit SVG images, my copy of Photoshop doesn't recognize them at least. Does anyone know how we can invert the colors of this particular SVG file so that it is white rather than black? That would prevent the need for the CSS filter. Thanks. https://processwire.com/newsite/site/templates/css/images/processwire.svg
-
It should still show you as being in the Docs section, but I kept the URL prefix as /api/ because there are so many links to /api/ref/ and I didn't want to 301 them at this time, plus I just like the readability of /api/ref/ since it is the API ref(erence). I didn't keep the /api/ prefix for anything else though. The only way someone would notice it says /api/ rather than /docs/ is if they look in the URL address bar and compare it from another page in the docs section. Yes it is, but currently it's too far out of date so I'm not showing it in the docs navigation at the moment. I'm hoping to get the cheatsheet connected to the API Explorer module so that it can always be up-to-date like the API Reference section.
-
All the screenshots in the iMac have now been replaced with PNG-8 versions, except maybe 3 of them that were nearly full screen photos, so they were kept as JPEGs, but with quality=60 rather than quality=10. @breezer Thanks for posting the screenshot. Looks good to me, but I see what @Chris Bennett was talking about with the alignment on buttons and that Segue font. I wonder if there's any way to solve that by targeting it with CSS... guessing not since we'd have to target a particular font, and I don't think there is a CSS selector for that sort of thing.
-
Actually I think I like this option best, thank you for mentioning it. I like how it looks on the Mac, but have no idea how it looks on Windows and Linux, so that's the only concern. I've switched https://processwire.com/newsite/ to use this font stack. If you guys on Windows and/or Linux have a moment, can you let me know how it looks or take a screenshot and post it? $pw-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; To view it using the previous font (Krub) just use this link: https://processwire.co/newsite/?font=krub In addition, I have also added some additional font links. These are fonts at Typekit rather than Google fonts: https://processwire.com/newsite/?font=bio-sans https://processwire.com/newsite/?font=supria-sans https://processwire.com/newsite/?font=trade-gothic-next https://processwire.com/newsite/?font=tablet-gothic https://processwire.com/newsite/?font=tablet-gothic-wide https://processwire.com/newsite/?font=adelle-sans https://processwire.com/newsite/?font=benton-sans https://processwire.com/newsite/?font=urw-din Also several other updates just pushed to the development site as well. I'm planning on launching it today, so there's likely to be some other updates as I take care of some more details.
-
@horst If already working in GD, what's necessary to make it work with the core? Or are you saying the ImageSizerEngineGD in the core already supports it? Admittedly I've not had much experience with webp but interested. Btw, how does the Barlow font version render over there? @jmartsch I enabled permanent scrollbars here and now I'm seeing it. I applied a few adjustments that seem to fix it and will push those updates later today. This is the way it has always worked (it did not change with the new site). However, I really have no idea of anyone is using it or not. I might disable it and see if anyone says "hey what happened?" Thanks I fixed it locally and will push the update later today. I don't immediately know how to implement ESC key here but will revisit it later. I think this is what I was feeling too (with Work Sans), there is kind of a typewriter feel going on. I still like it, but just thinking it's not the right fit here. I like Krub better than any others I've seen so far, but if it's got rendering issues then we'd need to determine if the issue is reproducible beyond Horst's computer, which I'm guessing it is, though have not yet heard any other reports. Barlow then Rubik are the other two that I think could do the job. I don't expect it to work with all links, it's just a quick-n-dirty way for us to see different fonts/colors. But it's not going to be retained as a feature of the site. It looks to me like an iPad, which doesn't speak to a development environment for me. Though maybe people are using them that way, I don't really know. But the goal with the frame was just to give the appearance of looking over the shoulder of someone's development and editing environment. While just a browser frame (or some other OS frame) is kind of what I expect to see here, anonymous, so I'd just tune it out. It lacks context of a dev environment that I think is needed here. It's got to be something that implies we're looking at the whole screen of an actual computer of a web developer, not just a window. I also don't want to show an iPad (or any tablet or phone) because that isn't representative of an dev environment, plus it implies something to do with mobile, which isn't a message we're trying to get across here. While we'll start with the current frame, I also see it as a short term thing. I personally like the current setup but I know it's also subjective. Regardless of subjectivity, I think it communicates what needs to be, and that's what I'm focused on rather than whether people think an iMac is ugly or pretty. But an actual video is the end goal, and this needs no frame. I'd like to replace it with that video Jonathan was working on, once that's at a good point (and if he's open to it).
-
@Robin S Here's Work Sans: https://processwire.com/newsite/?font=work This is one of those fonts that I do agree with you is very nice, but it seems like it works in some places and not others. I think it's the width combined with some of the details that is giving me trouble, especially at body copy sizes. Or maybe it could be that it's just so different that I'm not used to it. @teppo I am using a retina screens, both on my aging MBP and 27 iMac. However, my eyes are not so good, so I simply can't see anything if I use the scaled down resolutions. ? I have to use the default res (2560x1440 on the iMac). Not seeing the artifacts myself, but I know they are there, as I definitely saw them when I exported them in Photoshop. But the scaling them to 50% down (for hidpi) must have taken care of that. If using screen at native resolution (non-hidpi) I can see how the artifacts would show. I'll try re-exporting these. Making them PNGs doubles the size, but I think that's okay because I'm actually lazy loading these 1-by-1 as they display, so it's not slowing the initial page load. @horst thanks for reporting back on the fonts! Good to know some of them render well. Good to hear about the 110% thing being the cause of the dropdown issue. Though I have no idea how to fix that. I might have to switch up the order so that one of the items without a dropdown displays last.
-
This is not the case. The blue came from a color picker on the masthead of the current PW site. Though the current site uses a gradient, while the new site does not.
-
Hey guys, wow, thanks for all the feedback and testing! I’ve pushed an update to the pre-launch staging site that fixes most of the glitches that have been brought up. There were a couple that I wasn’t able to duplicate, so I’ve quoted those below along with more questions. There’s a lot of subjective stuff in this thread as well, which is of course great for conversation, but please don’t feel sad if I don’t implement these suggestions at this stage. The focus now is purely on just making sure that what’s present works as it should (working out any bugs), and not trying to re-do or rewrite anything prior to launch. So if you don’t like the blog or some color or some other part, that’s fine—I hear you and am keeping notes. But I’ve first got to make myself happy with it first before launching it, so that’s where it’s at. Over time I’m sure much will change, and of course all suggestions are appreciated, but for now bug fixes are the focus, and we’ll work on other stuff later. Regarding accessibility stuff, I have implemented several of the suggestions here like some of the items Teppo mentioned. Though should clarify there isn’t a specific goal of tailoring the site for visually impaired people at this stage. I don’t think that’s a large part of our audience at present, and so I want to focus time in the short term towards optimizing towards the traffic that the site will be serving. But please keep these suggestions coming because this is still very useful and we’ll get to more of this soon. One thing that has come up multiple times in this thread has to do with fonts and/or colors. We may very well change the primary color at some point, but not until the Modules, Directory and Forum sites are updated for the new design. The whole point of the current color scheme is to maintain some relation to the existing sites, since it may be weeks before those other ones are updated. But experimenting with colors is still I good idea. You can change the color of the entire site by using a URL with a “?color=<hexcode>” on any URL in the site. Once you do that, the color will be retained on any links you click on, so you can browse the site with your selected primary color. Here’s an example that changes all the blue to the PW pinkish/red color (try not to laugh!): https://processwire.com/newsite/?color=e83561 Replace that e83561 in the URL above with any hex color code to experiment. If you come up with anything you like, paste in the link so we can all see it. Fonts are one thing that we might have to change before launch. As Horst mentioned, the current font renders really poorly on his computer, which means it might be the same for other people (though have not yet had confirmation from anyone else). Plus a couple of you have mentioned you don’t like the font, so I’m open to changing it (though admittedly I really like the current font). I’ve set it up so that you can experiment with different fonts for the site by doing the same thing that you did for the color URL above, but with “font=name”, replacing “name” with the name of the font. It can be any one of these below. The ones near the top are ones I kind of like, though no real order other than that. https://processwire.com/newsite/?font=rubik https://processwire.com/newsite/?font=barlow https://processwire.com/newsite/?font=encode (no italic) https://processwire.com/newsite/?font=khula (no italic) https://processwire.com/newsite/?font=mada (no italic) https://processwire.com/newsite/?font=montserrat https://processwire.com/newsite/?font=nunito https://processwire.com/newsite/?font=palanquin (no italic) https://processwire.com/newsite/?font=raleway https://processwire.com/newsite/?font=source https://processwire.com/newsite/?font=muli https://processwire.com/newsite/?font=fira https://processwire.com/newsite/?font=hindm (no italic) https://processwire.com/newsite/?font=hinds (no italic) https://processwire.com/newsite/?font=ibm https://processwire.com/newsite/?font=lato https://processwire.com/newsite/?font=open https://processwire.com/newsite/?font=roboto https://processwire.com/newsite/?font=sarabun https://processwire.com/newsite/?font=exo2 https://processwire.com/newsite/?font=titillium https://processwire.com/newsite/?font=noto https://processwire.com/newsite/?font=cairo (no italic) https://processwire.com/newsite/?font=saira (no litalic) https://processwire.com/newsite/?font=heebo (no italic) As some of you might now, I got my first new computer since 2013 a little more than a month ago, and it's an iMac 27" (though a used one), so that's kind of why I wanted to get it on the homepage. I know it's not the newest looking computer, etc., but I really wanted something more than just a browser frame. Yes the screenshot jpegs that appear in it a low quality jpegs (quality=10). My eyes aren't so good and I'm not seeing the compression, but sounds like some of you are. I may redo those at a higher quality before launch. Though the way I see it, this whole iMac with screenshots thing is probably temporary anyway. I really like what @Jonathan Lahijani is doing with that video and am thinking that will be a much more useful fit for the homepage longer term. @jmartsch and @gmclelland I can’t seem to duplicate this one (also Chrome). Tried numerous widths, including the narrower width like shown in the screenshot too. That dropdown is always opening to the left for me. The screenshot shows it opening to the right. Just wondering if anyone else is seeing it and if so, do you know of any adjustments that would correct it? @horst This is the biggest concern I’ve come across here, as those fonts definitely look terrible in the screenshot you linked, and we definitely don’t want anyone to see them look like that. Is it an issue with this particular font, or do you observe Google Fonts in general rendering like this? Is this a known issue if you Google around, or is it just something you are observing on your computer? Do any of the new fonts render properly on your computer? Is anyone else seeing them render like this? I’m wondering if the issue is isolated to a particular platform/browser, or what it might be isolated too. So far nobody else has reported this, but if you are seeing it please speak up.
-
Thanks for all the feedback guys. I've been so busy this week I haven't had a chance to read and respond to it all yet, but will be sure to go through it all this weekend. I appreciate all of your interest. I've gone ahead and uploaded the site to a pre-launch preview location here: https://processwire.com/newsite/