Leaderboard
Popular Content
Showing content with the highest reputation on 12/21/2018 in all areas
-
Happy Holidays! This latest master version of ProcessWire contains hundreds of new additions, fixes, optimizations and more. This post covers all the highlights— https://processwire.com/blog/posts/pw-3.0.123-master/15 points
-
5 points
-
Merry Christmas to ProcessWire developers, supporting forum members and companies using PW.4 points
-
Hi all Just wanted to wish everyone who celebrates it a very Merry Christmas. Thanks to everyone on the forums for all the time and support over the year and all the answers, help and general banter. 2019 is hopefully going to be like 2018. Lots of learning, lots of Processwire, lots of great new Processwire developments. Anyway - have a good one ? P3 points
-
Wow, it's awesome when you see all the new features in a list like that. It really brings it home how active the development of PW is. What if we had a dedicated page on the new processwire.com for recording the history of added features? Not a changelog - which would be nice but I expect would be time-consuming to maintain and duplicate information that is already available in the GitHub commit history. But something more high-profile and permanent than a blog post, so people who are just discovering the PW website for the first time can be made aware of the speed at which PW is developed. I know from experience with some other content management systems that PW blows many competitors out of the water when it comes to the frequency that new features are rolled out, and it would be great to highlight that.3 points
-
$pages->find("template.name=songs, title=Last Christmas, band=Wham")->play(); // sorry for trolling ;-)3 points
-
Thanks @bernhard for pointing out the Donate button and a big thanks to everyone who has donated already ? I have just committed a new panel that hopefully you will all find useful. The Page Files panel shows (and links) to all the files that belong to the current page (including those in repeater items and even nested repeaters). It highlights (orange) files that are orphans - these are files that are in the /site/assets/files/xxxx folder for the page, but which don't belong to any of the file/image fields on the page. It also highlights (red) files which are missing from the /site/assets/files/xxxx folder but are referenced by one of the file/image fields on the page. Obviously missing files are more important and critical than orphans, so they are red as an alert, rather than a warning. The icon on the debug bar tells you how many files there are and how many are orphans and how many are missing. There is a "Delete Orphans" button to make it easy to cleanup these unneeded files. Note that the results are divided up into page IDs, starting with the ID of the page you are currently viewing/editing and followed by pages for any repeater field items. In parentheses it shows the name of the field that each file belongs to (except the orange orphans because obviously these don't belong to a field). You might wonder how you can end up with orphans or missing files? I find this mostly happens if I am building an API import script to bring in data from a site I am migrating and I mess something up. I also have this issue quite often when developing image related modules (especially my Custom Upload Names module). It may also potentially happen if there is a network glitch during an upload or delete call. Even if you don't have any orphans or missing files, you might still find it useful just as a way to quickly see the contents of the page's assets/files folder without needing to navigate via your file manager / FTP program etc. Let me know if you find it useful or if you have ideas for improving it. PS - this is obviously page based so it's not useful for doing a cleanup of your entire site - if you need that, then take a look at https://processwire.com/talk/topic/4437-delete-orphaned-filesimages-from-siteassetsfiles/?tab=comments#comment-43687 or other similar scripts in the forum.3 points
-
Hi, https://jobs.antarctica.gov.au/ is currently in the state of "404 Not Found, nginx"2 points
-
I was suspecting locale problems from the very beginning, that's why I asked to dump basename() and pathinfo() calls since they are both locale aware. Just to test again, could you @PWaddict try this: d(basename("ä")); with and without translated "C" in LanguageSupportModule? Though I'm getting the correct results regardless of "C" value. That's why we have a check that is performed on every login (and some changes are introduced recently to better clarify the issue here)! Do you get a warning message when you log in, something like "Note: your current server locale setting isn’t working as expected with the UTF-8 charset and may cause minor issues. Your current locale setting is “en_US.UTF-8”. Please translate the “C” locale setting for each language to the compatible locale in ... " ? if not, then why you translated the "C" in the first place and also translated to the nonexisting locale? There is no need to translate "C" string on windows (from my experience). Windows don't have "en_US.UTF-8" locale, that's why PW suggest "en-US". The list of supported locales on windows: https://msdn.microsoft.com/library/cc233982.aspx , see the language tag column. As for getting mixed results: the locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server API like IIS, HHVM or Apache on Windows, you may experience sudden changes in locale settings while a script is running, though the script itself never called setlocale(). This happens due to other scripts running in different threads of the same process at the same time, changing the process-wide locale using setlocale(). Glad you solved the problem ?2 points
-
2 points
-
Hi Folks, We've soft launched a client's site, https://canadia.ie Short summary of ingredients: UIKit based UI Some Vue.js sprinkles: Axios, GrahpQl, lot of methods for the product filtering Usual arsenal of PW modules like AOIM, AllInOneSeo, AutoSmush LeafletMaps, etc DO Server + a new tool 'RunCloud' to handle server config and the time consuming bits like SSL, DB setup etc Considering we only rolled to production today for the soft launch the site is very fast - especially filtering products, it's by far running 20x faster than the staging server. I'll post a more detailed update once we have finished fine tuning and installing any other post production modules.2 points
-
Correct. I am using echo $photo_header->srcsetUrls['smallest']; If I use echo $photo_header->srcsetUrls; there is an error but it only shows up in the network tab. The images seem to still work but they could be cached versions.1 point
-
Perhaps the 0-index fails to get the smallest img (I do not remember wether if it should or not). Could you try with $photo_header->srcsetUrls['smallest'], or with no initial style attribute at all?1 point
-
OT, but saveReady is one of those methods where before and after hooks are equivalent: https://processwire.com/api/hooks/#before_or_after @Zeka, the solution @kongondo linked to will work, but if you think PW should not be giving warnings for deliberate name changes that aren't related to a sibling name clash then maybe you could add your voice the GitHub issue? The fix that Ryan applied does not seem ideal and a solution (I gave a possible one in the original issue comment) that focuses more on the specific scenario of a sibling name clash would be better I think.1 point
-
https://github.com/processwire/processwire-issues/issues/648#issuecomment-4107586361 point
-
1 point
-
It doesn't matter if I enter a valid or a non-valid locale on "C" string. The cleanBasename will always be broken if "C" isn't empty. I tried this on the fresh PW installation and the same problem happens so I will post an issue on GitHub. Thanks for the help @adrian & @matjazp and wish you Merry Christmas!1 point
-
Ooh. My reading was that @porl had found some; ... they were just not decent ?.1 point
-
I cant't help any more since I'm going to a vacation for a few days. It would be helpful if you find the reason for all this. Will it help if you use just "en-US" for the windows locale? Or try this script: https://www.zen-cart.com/attachment.php?s=ecb022422821941d39f3bff5511c3ecb&attachmentid=16404&d=14652218781 point
-
Thanks @Robin S it's fixed in the latest version. I have also added a message to note that there are no files associated with the page. Also fixed a few other bugs so please update.1 point
-
1 point
-
Even if that did work, I'm hoping for something foolproof for clients because they will just tend to paste the URL straight from the address bar.1 point
-
Ah I see your point now ? I guess I thought you'd be able to paste: https://www.google.ca/maps/place/-46.44080555555555,168.32130555555554 directly into the RTE and the formatter could work with that, but Google redirects that link to: https://www.google.ca/maps/place/46°26'26.9"S+168°19'16.7"E/@-46.4408056,168.3191169,17z/data=!3m1!4b1!4m5!3m4!1s0x0:0x0!8m2!3d-46.4408056!4d168.3213056 which is where things start going wrong. It is strange to me that they use DMS as the actual identifier.1 point
-
1 point
-
Hey @Robin S - this is quite strange ? 46°26'26.9"S 168°19'16.7"E actually converts to: -46.44080555555555, 168.32130555555554 which you can see is perfectly accurate: https://www.google.com/search?q=-46.44080555555555+168.32130555555554 What is weird is that when you click on the map it shows rounded decimal values which are close to the values you are referencing above (but not quite). I have no idea why ? I have also never seen plus codes until now but they certainly look interesting, although I have always though of decimal degrees as the gold standard for lat/lng coordinates. None of this helps you - just continuing the discussion ?1 point
-
Did anything come of LiteBB? Sounds promising but I can't find anything unfortunately.1 point
-
You can use: $input->post('reset-button') or $input->post->{'reset-button'} This is not a PW issue, but rather a PHP one - you just can't use hyphens like that. That is why PW field names use underscores and not hyphens.1 point
-
Hello Adrian!!! Thank you very much for your answer! Now I get it!!! Processwire has the best forum ever!!! Thank you so much!1 point
-
Thank you for the time you took to answer. @Peter Knight unfortunately I am using bootstrap on this template, the next time I will consider uikit, this is not the first time people suggest me to switch ? @szabesz Thank you thank you. Now I see how it works. This answer should be pinned as tutorial for CKEditor!1 point
-
Hi @Michkael I haven't read back through the previous posts so apologies if this is addressed above by someone else. Responsive Images I primarily use UIKit (v3) for my sites and one thing I really like is that images are responsive by default and don't require any extra markup. This is particularly useful for clients because they don't have to apply any CSS to their images. I like to keep things super-simple for my clients to save them having to remember CSS class names and it also keeps my support times down. Blog Overview Structure My blog 'Overview' page is very simple and here's a simple wireframe. To have the blog overview page populate with content, I am only asking my clients for a few simple items Create a page with template=blog-post Add a preview image (the thumbnail above) to an images field Complete a field called blog-summary The key thing here is really how you handle the preview image and there's a couple of ways to do this as outlined in the help docs FIRST IMAGE You can can tell your client that the first image in an image file will always be the preview thumbnail. This has worked well for me. // grab and output first image $image = $page->images->first(); if($image) echo "<img src='$image->url'>"; or IMAGE WITH TAG You can tell your client to 'tag' an image within an image field to make it the preview thumbnail. That works well too. // retrieve first image with tag 'mytag' $image = $page->images->getTag('mytag'); or SPECIAL IMAGE FIELD You could always create a specific images field just for the thumbnail and limit it to 1. That way your client has zero configuration. I know some of the guys like to keep their fields to a minimum and usually I too try to avoid this. I make a call based on the actual client and their level of experience with CMS etc. Blog Post Structure On the actual blog post, I almost always have the preview image as the first image in the post. Crucially, this is added automatically by my PHP / templating. IE client only adds an image once for it to be both thumbnail intro image For the other images within the body of a post (number 2 and 3 below), it's up to the client to add these to the images field and then apply via the text editor etc. So I never run into the issue you mentioned re CSS and images. I know there are ways to add CSS to the CK Editor and ask the client to apply them but I try to steer clear of that. To me, a CMS is a content tool. Not a design tool. Telling clients they have formatting options within the CKEditor field beyond H1, H2 etc opens up the possibility for them to get 'creative' and can quickly make the site content look messy. If I really, really had to apply CSS to the images within the body field, I would probably look at something called field templates which was announced a while back. I can't recall but i *think* this allows you to specify a mini field template. Within that you could probably target your images with something like .my-body-template img { // css rules } Might be worth a look.1 point
-
Or just put that in the settings: { "files.associations": { "*.module": "php" } }1 point
-
You could also add the class in its separate .php file and require_once (/path/to/the/external/file/) that file within your module...1 point