Jump to content


Popular Content

Showing content with the highest reputation since 01/19/2020 in all areas

  1. 5 points
    I don't agree 🙂 If a reviewer has no useful knowledge of a system he is reviewing (he states: "I assume"), then he should not do the review in the first place, so "You can't fix 'stupid'" is a proper way to put it in a few words, even though it is a bit offensive, sure, but he deserves it in this case, and we are writing in the Pub section... I'd also like to point out that such a statement by the reviewer is dumb. He might also say that "Laravel is great for developers (I assume), pretty bad for everyone else.", for example. Reading his complete review, he clearly has no idea what he is talking about. PW's admin – by default – is for developers, so why comparing it to WP's and Squarespace's admin, which are for bloggers and such by default? Apples to oranges? I am also a person who did not want to spend the time on exploring ProcessWire for the first time I installed it. At that time I was jumping on the WP bandwagon and thought: so many options to explore, I have no time to explore a yet another system. Later on, I realized what a piece of you-know-what WP's internals are, so I gave ProcessWire another chance, never regretting it, of course🙂
  2. 5 points
    I don't think it's fair to blame him for his opinion. I think there are some valid points in it. He clearly has a non-tech marketing background and I can imagine that some kind of problems get a huge challenge with ProcessWire that are simply some clicks on other platforms. We know the pro's and con's, but if you don't have the technical background I can really understand that you get frustrated with ProcessWire. Not everybody has the time or will to learn things "from scratch". The headline states that he assumes PW is great for developers, pretty bad for everyone else. While I don't agree 100% on that, the point that PW aims on developers is true. I'd maybe add that it is also great for clients. But that's not always the case, to be honest: I think we all have had situations where we've stored data (settings, lists of countries and so on) somewhere in the page tree, because that's the way to do it in PW... But that's not the way someone coming from other platforms would assume it to be. I guess they'd be looking for it somewhere in the menu, in some listings or whatsoever... I've also needed @gebeer convincing me that it is a great platform. But I enjoy all the technical challenges, so that'll most likely be a totally different experience than someone who he calls "business users" might have 🙂
  3. 5 points
    UPDATE 2020-01-19 This is a follow-up to my last post! The question was asked when v3 of the cart system will be implemented in SnipWire. The following features are still missing in Snipcart v3: Digital goods Google Analytics integration Inventory management Deferred payments Multi-currency Recurring subscriptions with Stripe Authorize.net support Some of the listed features are required by SnipWire as they are essential and would require a lot of code rewrites to exclude them. So SnipWire will be changed to use v3 of the cart system when the following features are available in Snipcart: Inventory management Deferred payments Multi-currency
  4. 5 points
    UPDATE 2020-01-19 I finally finished the integrated taxes provider - SnipWire now also handles shipping taxes correctly - and in a very flexible way which should cover pretty much all tax calculation methods/requirements worldwide! The integrated SnipWire taxes provider is now even more flexible than Snipcart own integrated provider! A store merchant can choose between the following shipping taxes calculation methods: No shipping taxes Apply a fixed tax rate: A fixed shipping tax rate from taxes configuration is used. Apply predominant tax rate: The shipping costs are allocated entirely to the economic good with the highest tax rate. So the highest tax rate from cart is used to calculate shipping taxes. Proportionally split and apply tax rates: The shipping service is divided as a secondary service and shares proportionally the fate of the respective main service. Part of the shipping service is thus subject to the normal tax rate, part to the reduced tax rate. If you find any other constellations which cannot be covered by the present options, please drop me a line and I'll add it.
  5. 4 points
    Although you can't create a global field, you can access fields from any page on any template, so you could create a settings 'page' that isn't visible on the site, but holds any fields that you want to use globally, and then access them in every template eg: $global = $pages->get('name=settings'); echo $global->myfield; Remember that in Processwire, everything is a 'page', but it doesn't have to be an actual visible page on your site.
  6. 4 points
    Great so see the comments field get an update. Would it be possible to add some modern needs (options? hooks?) for the comments form to be able to include a mandatory GDPR checkbox with some legal text decide which fields from the form are mandatory and which not saving or not saving the IP address with a setting how long to keep those make it easier go apply UIKIT3 to the layout There are existing workarounds in this forum (by modifying a field clone in /site/) but that is a bit hacky i.m.h.o. for those common needs. Also the documentation linked to from the field admin feels a bit dated for all the extra stuff available...
  7. 4 points
    You might want to also validate the date when the page is saved as @BitPoet suggests, but it is possible to limit the datepicker to only future dates with some custom admin JS. The relevant option is minDate. The core sets the datepicker options on focus, so to ensure the custom option doesn't get overwritten I've found that the most reliable way to apply it is by using a beforeShow function. For a Datetime field named "crondate": $(function() { $('#Inputfield_crondate').on('focus', function() { $(this).datepicker('option', 'beforeShow', function() { return { minDate: 0 }; }); }); }); Edit: just noticed you want a minimum time also. Try this: $(function() { $('#Inputfield_crondate').on('focus', function() { $(this).datepicker('option', 'beforeShow', function() { return { minDate: 0, minDateTime: new Date(new Date().getTime() + 30 * 60000) }; }); }); });
  8. 3 points
    @Ivan Gretsky and @szabesz - new version adds a new "Bar Position" module setting that lets you choose between bottom left and bottom right. Let me know if you notice any problems.
  9. 3 points
    preg_replace('~(<h[23]\\b.*?>(?:<[a-z][^>]*>)*)(\w+)~ism', '$1<span>$2</span>', $headline); quick&dirty in PHP
  10. 3 points
  11. 3 points
    After looking at his site, my guess is "You can't fix 'stupid'"
  12. 3 points
    If we check the reviewer website (https://dougmcarthur.net/) then we understand why he sees the Processwire environment so difficult and complicated, even for Wordpress standards this website is very simple: a theme template and a couple of posts. Additionally for that plain homepage in the "recommended" Wordpress it needs: Fully Loaded Time: 9.4s Total Page Size: 5.68MB Requests: 52
  13. 3 points
    It does, it's just not documented unfortunately. I linked to information about it in my earlier post above. Here is a demo... Page structure: Field settings for subcategory field: "page.category" will be replaced with the ID of the page selected in the Category inputfield in Page Edit, whenever that field changes. The "has_parent" part is just to avoid unwanted pages appearing in the Subcategory inputfield if the Category inputfield is changed to empty (no page selected). Result:
  14. 2 points
    Just saw my site was featured in this week's newsletter! Thanks guys 🙂
  15. 2 points
    Go back to modules and install the second part of the module called "Duplicator - Packages Manager". Afterwards you can manage your packages.
  16. 2 points
    Yeah, sorry about that - the Tracy core just uses PHP's mail() and I wasn't sure how to hook into the send process so I could implement wireMail - of course it turned out to be easy, but it wasn't documented so had to dig a little.
  17. 2 points
    Actually, the .gitignore in PW root is a nice starting point already. Some of the things I would probably add: *.notes *.sql *.zip site/assets/cache/* site/assets/ProCache* site/assets/pwpc/ site/assets/sessions/ wire/ .sql + .zip are most likely local backups, so I def. don't want them included site/assets/... stuff depends - cache (regular + ProCache) stuff + sessions I'd also not want to carry over. wire/ should certainly not be part of a repo. btw: .notes is just how I store login details; Apache blocks web-access to any files starting with a dot anyway, but you don't want to take chances, so I added this to .gitignore too.
  18. 2 points
    In most cases... everything but /wire/.
  19. 2 points
    quick, dirty & ready 🙂 $this->addHookAfter('Page::render', function ($event) { if ($this->page->template != 'admin') { // just an example I use in almost every PW site: add responsive wrappers around iFrames: if (strpos($event->return, 'videoWrapper') === false) { $event->return = str_replace("<iframe", "\n<div class='videoWrapper'><iframe", $event->return); $event->return = str_replace("</iframe>", "</iframe></div>", $event->return); } // another example I use in almost every PW site: add responsive wrappers around tables: if (strpos($event->return, 'scrollTable') === false) { $event->return = str_replace("<table", "\n<div class='scrollTable'><table", $event->return); $event->return = str_replace("</table>", "</table></div>", $event->return); } $cleaned = preg_replace('~(<h[23]\\b.*?>(?:<[a-z][^>]*>)*)(\w+)~ism', '$1<span>$2</span>', $event->return); // BitPoet's regex magic $event->return = preg_replace('/<p>\\s*?(<a .*?><img.*?><\\/a>|<img.*?>)?\\s*<\\/p>/s', '\1', $cleaned); // remove default paragraphs around images in CKE } });
  20. 2 points
    Hi Adrian, I would be happy to hear that you give another chance of the possibility to move the bar to the bottom left corner, optionally. Dragging it around is kinda pointless, at least in my point of view, but as I already explained it in the past, the bottom right corner can sometimes be problematic when Tracy interferes with something, and covering an interactive part of the site is not really a solution. However, it is very rare that both bottom corners contain interactive elements, so being able to pick which corner to cover would suffice most situations, I think.
  21. 2 points
    This is the answer I got in their Slack developer channel:
  22. 2 points
    Well, that was... interesting 🙂 I can only guess that someone somewhere used ProcessWire to build a really, really complex website (it's very much doable, and I've come across a few of those as well), and that's what this person is actually writing a review for. When you're not particularly familiar with ProcessWire or its inner workings, it's easy to take a look at a specific implementation and assume that it represents the entire platform (both in good and bad). As always it'd be interesting to hear a bit more about the specifics that led to such outburst, but as it stands, this review provides little value for anyone.
  23. 2 points
    Done! 🙂 - donation button in GitHub repo, forum signature and initial SnipWire forum post. (I hope this is not against forum rules?)
  24. 2 points
    Here's an example that works without having to first save & re-load the page you're editing. The setup: In my page tree somewhere (usually under a parent I call "meta", "settings" or similar), I have main and sub-categories as pages: The sub category pages have template "empty" with just the title field and nothing else - not even a physical template.php file. The main category pages have tpl "maincat", which holds an addtl. field "main2sub", which is a page reference field. Here you map your sub-categories to each main category. My (simplified) product tpl has two fields: maincat -> page reference field single. Parent = main cat / 1366 select_categories -> page reference field multiple / output as checkboxes. No configuration set in field settings "selectable pages". So far, so boring. I need JS + PHP for the auto-switch to happen. I created site/templates/admin/admin.js In order for PW to even load it, I edited site/templates/admin.php: $config->scripts->add($config->urls->templates . "admin/admin.js"); require($config->paths->adminTemplates . 'controller.php'); // this must stay as the last line admin.js looks like this: It's written in plain JS (ES6). With jQuery it would have been a bit shorter, no doubt, but I got into the habit of using as much vanilla JS as possible. If you need to support older browsers, you'd need to run it through something like Babel. In nearly every PW installation, I create a dedicated template + page that acts as an API / AJAX endpoint. Create a new template "api", enable URL-segments, create a file "api.php" in site/templates/, and finally create a hidden page somewhere that uses this template. Use the option "must have trailing slashes" (check yes). The api.php looks something like this: Basically, what happens, is: On page load and on main-category-dropdown change, I send an AJAX request to my API script with the page ID I'm currently editing and the main category page id. The API script then sends back the matching sub-categories as JSON. JS again then loops through all checkboxes, and de-activates and hides all non-matching choices. It works, but it's not perfect*. I wish PW had an in-built way to handle such scenarios. As always, YMMV. * There's a split second on page load where you see all sub-categories. And also, when you select again the same main-category (without having saved the page), if you made selections previously, they're being erased. The first (minor) issue could probably easy be prevented if you set your subcat field to closed. You could first do your JS-syncing and at the end make them visible with Inputfields.open. Speaking of Inputfields JS API... I found that Inputfields.reload() didn't work here in my example (I tried several types of fields). Pity - would have made such a thing much easier...
  25. 1 point
    Hi all. Just thought I'd add the updated site I made for the Judo/BJJ club I run. For some odd reason I decided I wanted to try making a single-page website but still use ProcessWire's great page management tools. The site uses the excellent Template Engine Twig module (slightly modified to work with Twig 3) and dynamically builds itself using the page tree (no hard-coded sections). I'm no great designer, but using the above along with Bootstrap 4 and some probably-excessive animate-on-scroll effects I think it looks clean enough to differentiate itself from more standard martial arts websites. Anyways, you can visit the site at http://jkma.club and hopefully enjoy!
  26. 1 point
    I would just probably add a new ckeditor span with a class so editors could apply manually. That would also allow excluding headlines.
  27. 1 point
    Now I know why those emails often ended up in the spam folder... Thanks for the improvement!
  28. 1 point
    I might have some experience on this matter 🙂 @Haagje R. you've got a PM.
  29. 1 point
    I do the same as wbmnfktr. I also include a github action that auto ftp/pushes the updated files to a directory on my server that can be found here: https://github.com/SamKirkland/FTP-Deploy-Action
  30. 1 point
    @Haagje R. as dragan said, first setup ftp or shell access to the root of PW installation and then remove/rename install.php. I don't get it how the site was working with install.php present. Then, as Bitpoet said, replace ProcessWireUpgrade module with the new one, as this is the problem. I use PW on WIndows/IIS and not on Linux/Apache but I can help using Teamviewer. PM me if needed.
  31. 1 point
    This is now fixed in https://github.com/processwire/processwire/commit/c5417d98ad968ae1aa4b00c73304dc1b4f21c2f3 (PW 3.0.150)
  32. 1 point
    Hi @bernhard Can you try @next branch https://github.com/trk/Mystique/tree/next, this will be next version.
  33. 1 point
    Not sure if this will suit your needs, but in javascript (jquery) you could do: $('h2').each(function() { var $element = $(this); $element.html($element.html().replace(/^(\w+)/, '<span>$1</span>')); });
  34. 1 point
    @Macrura First of all: Thanks for this great module. I noticed it already when you first released it, but because there was no real for it in my own projects, I never installed it till now. I found a confusing behavior (bug?) when I use the kitchen sink example. No matter what email address I try, PW always shows me an error: "InputfieldEmail: Please enter a valid e-mail address - Email Test" It doesn't matter if I use a real, existing email, or just a semantically correct one. What's even more strange is that this red error shows up on every page in the PW admin - literally everywhere. Am I missing something obvious? PW throwing an error if a required field is empty or doesn't match some regex rules is one thing, but that should only be visible in the respective page-edit screen, not globally? The only thing I noticed: There is no "autoload disabled" checkbox in module/edit?name=ProcessSettingsFactory I'm using SF 1.0.3 and ProcessWire: 3.0.149 PHP: 7.3.13 Webserver: Apache/2.4.35 (Win64) OpenSSL/1.1.1d MySQL: 5.7.24
  35. 1 point
  36. 1 point
    Why is the corresponding table not automatically deleted by ProcessWire after a field is deleted in the admin panel? Now I have numerous "dead" tables of no longer existing fields in the database of my ProcessWire installation. Or is there a configuration that I have missed? Thanks for your support.
  37. 1 point
    That's why I said I'm lucky. All my PW sites are "in the house" and my "clients" are my colleagues at work and they do what I say :-) I see. My "customers" are 95% from Slovenia so I don't have to worry about that, luckily. I haven't implemented webp on my sites so I didn't think about that because I just recently upgraded to PW that has webp support. On my sites images are rarely inserted into RTE. If this is the case then you may be better of using .htaccess strategy.
  38. 1 point
    on a side note, I was able to create dependent selects using 2 selectize fields, where the options available in the 2nd select dynamically changed based on the selection in the first field. Maybe this topic is relevant...
  39. 1 point
    How does that work with Tracy? 😮
  40. 1 point
    @Robin S This is terrible. I don’t know how I overlooked it, сause I've looked at this part so many times Thanks!
  41. 1 point
    @ngrmm thanks for letting me know about that config issue. Will get that sorted in a min. On the SendGrid front I'm not too sure. SendGrid should show sent and received stats for all messages, therefore if you're not even seeing that (and the message is delivered) then something else is probably not quite right.
  42. 1 point
  43. 1 point
    One other small thing - can you add support for the built in 'title' field in the Page type? I tried this locally editing the getBuiltInFields() function at line 41 in src/Type/PageType.php Thanks, Tom
  44. 1 point
    The GDPR doesn't actually handle cookies specifically. GDPR is about processing personal data. A cookie is processed by a webserver when a user accesses your website, so GDPR is applicable IF there is personal data involved in regards to the cookie. Even a simple session cookie is personal data, because it identifies a certain browser session, which in turn likely identifies a person. There are a few things GDPR demands you to provide to users in such a case, like what the data is used for (Art. 13/14) and it needs to have a legitimate reason (Art. 6) for you to be allowed to do so. This is even more complex if it's not a cookie set by your website, but by a third party. There it's the shared responsibility between your and the third party that everything is handled correctly. This is usually done with DPA (data processing agreement) which is a binding contract where both parties essentially guarantee each other GDPR compliance. The GDPR gives users the right to deny consent wherever you cannot use Art. 6 1.f) as legitimate reason. Therefore cookie-banners with the option to not have certain cookies set. The GDPR also says you may not auto opt people into giving consent, therefore the default for optional cookies should be unset. Besides the GDPR there's afaik a law in Germany for cookies specifically, which has been the kinda predecessor for the long overdue EU wide ePrivacy directive. I'm not as well versed with this one. It was essentially the law, which started all the cookie banner stuff.
  45. 1 point
    Hello @Brett. Thank you for your feedback! I was able to reproduce your issue and hopefully tracked down the bug. Please, install the latest version and give it a try. Let me know if the issue is resolved for you. New Release 1.1.3 - Fixed bug with FieldtypePage returning only single value.
  46. 1 point
    It mostly doesn't matter, you get the same API variables independent of the method. That said, I would suggest the following for readability: $this: Use only inside of classes extending \ProcessWire\Wire. It appears that $this is also available in template files as a reference to the current wire instance, but as you said, this is a somewhat confusing and unconventional usage given that you're not actually inside a class. $wire: Use inside regular PHP template files (or if you want to use a different API variable like $page, $pages, $input, et c. use that one directly). wire(): Use inside functions (not class methods) so you don't have to pass $wire or $this to the closure.
  47. 1 point
    of() is a method of Page objects, but you're trying to use it on an PageArray of Repeater pages. Try: // Get the page you want to work with $home = $pages->get("template=home"); // Turn output formatting off for the page $home->of(false); // Change the Repeater field value $home->submissions->removeAll(); // Save the page $home->save();
  48. 1 point
    I was worried that might happen. @bernhard added .php to the TracyDebugger.module file so that intellisense in vscode could work its magic. I thought I might starting adding the php extension to all my modules files because .module really is a silly extension in my mind. You'll be able to solve the issue my deleting the .module version. Same goes for ProcessTracyAdminer.module. I am curious what method you used to upgrade. I would have thought that the PW Upgrades module would handle this and a git update approach should also work. Updating via modules > add new should also work. Did you just unzip and copy?
  49. 1 point
    The way I was able to solve it, is you have to create 2 different api's. One for the front end, where you set restrictions to your domain name. And then another for this module where you set the restriction to your server's ip address. Also, make sure that geocoding api is enabled in google console. Hope this helps.
  50. 1 point
    Hello, the issue has been resolved. To anyone facing the same problem, do NOT set permission 'page-edit-created' role-wide; instead, add it as an additional edit permission in each template relevant to the role. Thank you
  • Create New...