Jump to content


Popular Content

Showing content with the highest reputation since 11/13/2019 in all areas

  1. 5 points
    And done ๐Ÿ™‚ 0.5.0 released
  2. 5 points
    LOVE the new module! I'm adding this to every site for sure. ๐Ÿ™‚ In terms of alternatives, besides the SystemNotifications module mentioned in the post there is also Page Edit Soft Lock, but UserActivity is more powerful. A question: is it possible to use this module via the API to find all users currently logged in by role? Something like (pseudo-code): $logged_in_editors = $userActivity->findLoggedIn("role=editor"); I think that could be useful. Thanks @ryan!
  3. 4 points
    It's not related to ProcessWire. That's the good news. The bad news are: I don't know the answer. ๐Ÿ˜‰ Some say it's related to your hosting provider, some say it's related to a CDN. I found two similar issues out there in the wild: https://wordpress.org/support/topic/unusual-stuff-in-the-url/ https://community.cloudflare.com/t/website-css-not-loading-loads-with-development-mode-on/128163 So... if there is no CDN involved, try to look into your hosting and maybe even ask their support team. Last but not least: Welcome to the forums. ๐Ÿ™‚
  4. 3 points
    @rick, @d'Hinnisdaรซl, @cb2004, @szabesz Thanks for your input! So the coming PW master version will be the minimum required by SnipWire. This will make things definitely easier for me...
  5. 3 points
    Ah ha moment - I think I got it! Setting the root url in the template seems to have solved the issue. Although I think as per your post @wbmnfktr there's possibly a less destructive/repetitive way to this in future if can get my head round it! <?php $config->urls->root = '/pw/';?>
  6. 3 points
    They do it all the time. No matter how many accounts exists... most of the time all people use just one. I always try to convince clients not to share accounts, but in some cases they flatly express that they will indeed use "shared accounts" no matter what. Their excuse usually boils down to laziness: they do not want to deal with managing users at all. In such a case I ask them at least to call such a user as "shared editor" or similar so that at least we know how to treat that account in question. So for the reasons outlined above, some support for this would be welcome, maybe with some additional logging options so that we can track down such activities even days after...
  7. 3 points
    Hi @adrian, Got a chance to look at this today. Batch requests (batch mode on, to emails > 1000) now get split up into separate API requests with 1000 emails per request. The only way I could test this was to reduce the limit to 2 and then try sending a batch request to more than two email addresses. Seems to work fine, however I'd recommend enabling test mode and testing with this to confirm that it works correctly for emails being sent to 1000+ users prior to sending for real. I've also moved the batchMode setting into the module config, so it can be set to ON by default. Cheers, Chris
  8. 3 points
    Mine looks worse. After a week of use ๐Ÿ˜‰
  9. 3 points
    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).
  10. 3 points
    Hi @Peejay, did you run the Additional steps / Install Snipcart products package in SnipWire module settings? This step installs product templates, files, fields and some demo pages required to build a Snipcart product catalogue. This additional step is needed to prevent unintended deletion of your Snipcart products catalogue when main module is uninstalled. In the current alpha version this isn't yet checked by SnipWire. If you did already run the additional step with an earlier SnipWire version there will be fields missing which were added in a later version. So you will need to re-run this step. The missing resources(fields, templates, pages, ...) will then be installed. Existing ones won't be touched! To re-run this step, you will need to edit/remove a key in database directly: DB table: "modules" -> find entry with class "SnipWire" -> edit the "data" field and remove the Json key: "product_package":true (be sure to leave a valid Json string - you will need to also remove the corresponding comma : {"api_key":"YOUR_LIVE_API_KEY","api_key_test":"ODQzZTc1MjktZGQxNy00YmUzLWFkMWYtZDE3MDQ2YTk1ODNjNjM2ODE3NTg5NzUyNDQxOTc0","api_key_secret":"YOUR_LIVE_API_KEY_SECRET","api_key_secret_test":"","snipcart_environment":"0","single_page_shop":"","single_page_shop_page":1,"credit_cards":["visa","mastercard","amex"],"currencies":["eur","usd"],"show_cart_automatically":1,"shipping_same_as_billing":1,"show_continue_shopping":1,"split_firstname_and_lastname":1,"snipcart_debug":1,"snipcart_css_path":"https:\/\/cdn.snipcart.com\/themes\/2.0\/base\/snipcart.min.css","snipcart_css_integrity":"","snipcart_js_path":"https:\/\/cdn.snipcart.com\/scripts\/2.0\/snipcart.js","snipcart_js_integrity":"","include_jquery":"","jquery_js_path":"https:\/\/code.jquery.com\/jquery-3.3.1.min.js","jquery_js_integrity":"sha256-FgpCb\/KJQlLNfOu91ta32o\/NMZxltwRo8QtmkMRdAu8=","excluded_templates":["promailer-email","promailer-subscribe"],"cart_image_width":65,"cart_image_height":65,"cart_image_quality":70,"cart_image_hidpi":1,"cart_image_hidpiQuality":50,"cart_image_cropping":1,"data_item_name_field":"title","uninstall":"","submit_save_module":"Submit","taxes_included":1,"webhooks_endpoint":"\/webhooks\/snipcart","include_snipcart_css":1,"taxes":"[{\"name\":\"20% VAT\",\"numberForInvoice\":\"\",\"rate\":\"0.20\",\"appliesOnShipping\":[]},{\"name\":\"10% VAT\",\"numberForInvoice\":\"\",\"rate\":\"0.10\",\"appliesOnShipping\":[]},{\"name\":\"10% VAT (Shipping)\",\"numberForInvoice\":\"\",\"rate\":\"0.10\",\"appliesOnShipping\":[\"1\"]}]","snipwire_debug":1,"data_item_categories_field":"snipcart_item_categories","product_package":true} After the key is removed, visit the SnipCart module settings again and re-run the product package installer! In the release version of SnipCart, this will be handled automatically. On each update it will check if there are new fields or other resources to be installed. Hope this helps! p.s. You could also completely uninstall the SnipCart module and then reinstall - this should also activate the product package installer link! -- Martin
  11. 3 points
    ProcessWire / Fullcalendar solution including comfortable planning app in the backend: https://vdt-icsa.de/program/ https://2018.tonmeistertagung.com/en/program/
  12. 3 points
    Sadly, the rider of this new horse is dumber than a truck-load of doorstops. So I found another way to accomplish what I was looking for. In my opinion, it's hacky, as I still don't know the answers to my op questions, but it will work for now. The $_FILES['input_file_fieldname']['tmp_name'] works as the parameter to New WireUpload(). The result is a randomly created name saved in both the PageImages and file system. Using Soma's rename procedure to provide the original uploaded file's name corrects that anomaly. The result is an uploaded image with the correct (human readable) name. Anyone want to buy a horse? Only ridden once. Includes a new stick. Cheap.
  13. 3 points
    I think it should be: $page->fixtures->find("team_a=$teamA,team_b=$teamB");
  14. 2 points
    After giving it some more thought, I decided to merge the 2 modules and call the resulting ImagePicker. One thing I'm not sure yet how to best approach it: 1. should the options for choosing images from pages/folder/current page be exclusive, so that only 1 option can be set per field? Or 2. should it be possible to choose all 3 I guess, 2 makes more sense. The challenge will be to make the UI/UX of the inputfield lean, clear and easy to deal with. Instead of having the thumbnails underneath the preview image, I think with that many possible sources for images, it will be better to present them in a modal window.
  15. 2 points
    BTW, when can we expect that to happen? Sounds like sooner than the end of December maybe? Is it going to be the first production ready version? Thanks for sharing all your hard work, and do not forget to ship it with a "Donation button".
  16. 2 points
    Hello and thanks for reply ๐Ÿ™‚ @MilenKo thanks for idea about html. According to your idea the body_html field becomes an element content. Sounds good I want to try ๐Ÿ™‚ For a diagram visualization simpe it is https://www.draw.io/ You can add this "app" to your google drive if yuo want ๐Ÿ™‚
  17. 2 points
    Welcome to the forum, @Ovolion. It sounds like you would be better off using a dedicated e-commerce solution such as PrestaShop. Not that ProcessWire can't accomplish the same thing, but in this case I think it would be better to go with a dedicated solution. Just my $.02
  18. 2 points
    Nowhere. This is embarrassing. I forgot about language field when I rewrote the module for alternative graphql library. My bad, sorry. New Version 1.1.0 I updated the module to support languages now. Please upgrade and it should work fine. Sorry for inconvenience and thanks a lot for the feedback.
  19. 2 points
    Please read this: https://processwire.com/blog/posts/pw-3.0.80/#pro-module-faqs then contact Ryan directly.
  20. 2 points
    They do it all the time. No matter how many accounts exists... most of the time all people use just one. Some just don't want to be responsible for changes so they take the credentials from another user or "admin" account they somehow can get.
  21. 2 points
    Thanks for reporting back! I just published a new version on GitHub which has some great performance improvements and a lot of other new features! The orders list is now loaded in 1 - 1.5 seconds (instead of 4 seconds). The dashboard is also affected by these changes and should load much faster now!
  22. 2 points
    Yeah, well in that case it really seems impossible. Can't you narrow it down with some other condition? has_parent, template, or similar? I know you said you want something future-proof, but certainly you are not adding new templates every day? Field dependencies let you write your own logic in plain PHP (one of many options), I guess Ryan has a reason he didn't allow such freedom when it comes to Lister (Pro or not) - probably security concerns. You might want to take a look at @bernhard's RockGrid module instead. A bit more work initially than just creating a new Lister Pro instance, but you're totally free to list / select / query whatever you like.
  23. 2 points
    Have you looked at the $session documentation? If so is there a specific problem you're having?
  24. 2 points
    Ok, my bad. Still, reporting post serves a completely different purpose. Hopefully this will be picked up by someone that can address the issue, but the best is to post the issue on github. You would have to create an account there, and of course that's up to you, but you don't need to use git to do it, only fill a form on the site.
  25. 1 point
    Oops, sorry, totally slipped my mind! I'll have a look ๐Ÿ˜„.
  26. 1 point
    This could also solve my request of adding images directly to that page ๐Ÿ™‚
  27. 1 point
    Thanks @bernhard, I'll dig it deeper with your suggestion, even though it seems like their rates are way too high for my project. @psy Nice module! I'd love to use it to complete this task, looks like it could let me easily list files of a dropbox folder into my site. How to share, instead, just some specific files (belonging to the dropbox folder) to a specific user? The ideal situation would be: 1) My client (whom is the one has access to the dropox panel and can upload files) decide to share just few files to user "x" (user "x" has previously registered to my pw site and has a private page). 2) Choosen files appears as links on the private user page ( I've noticed this on the thread you posted, but it's just part of the job). One solution that comes into my mind would be to copy/paste such file links to a repeater belonging to the user page and iterate it on the front-end.
  28. 1 point
    There is an old video around that shows how it could be done. It's the older version of ProcessWire in that video but it would work the same nowadays - just looks a bit different now. In terms of best workflow... it really depends on various factors as @bernhard already mentioned. I wrote about my personal workflow in or with ProcessWire here and here.
  29. 1 point
    Hello, thanks a lot for your messages and applications. We are happy to have found someone who will support us. Regards Annemie
  30. 1 point
    Here is my final init.php code for bilingual password forgot. if (wire('session')->language) { wire('languages')->setLanguage(wire('session')->language); } $wire->addHookBefore('ProcessLogin::execute', function($event) { if (wire('input')->lang == 'fr') { wire('languages')->setLanguage(7085); wire('session')->language = 7085 } });
  31. 1 point
    @gebeer - I am sure you have already thought of this, but if you're changing to only support selecting a page (and its children), you could make use of PW's API to load up the images in the picker field, rather than scanning the server folder directly. I don't think there is a reason not to change.
  32. 1 point
    What about adding the image description, width, height, and filesize to the tooltip and under the selected image?
  33. 1 point
    Ok I found this codepen: multiple sortBy and through rearranging and cleaning up my code a bit, as well as making the sort order static and not changeable via a page field this sortBy: ['featured', 'date'], actually works, where the items get first sorted by the value of featured and if that is the same they get sorted by date.
  34. 1 point
    I agree that there should be a different value for necessary cookies... Maybe the pwcmbAllowCookies in localStorage could have values like "all", "necessary" and "no" instead of just "y" and "n"? I also thought about respecting the "DoNotTrack" choice of the user in the browser. I'm currently working on this, but this simple snippet at the start of the init function should do it: /* if the user activated the "DoNotTrack" function in their browser, respect that choice and do not show the banner */ if (navigator.doNotTrack) { cookieMonster.cfg.allowCookies = "n"; cookieMonster.cfg.selectionMade = "y"; cookieMonster.cfg.storedVersion = cookieMonster.cfg.version; cookieMonster.sendActionBeacon(); cookieMonster.updateStatus(); cookieMonster.sendTrackingBeacon(); return; }
  35. 1 point
    Hi, thanks @Robin S for your hook example, but also (in my case) I had a problem to save values inside repeaters. I use 3 fields per/row and out of repeaters everything works fine (PW 3.0.146.). The images below shows my page tree and two different situations (after save). --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Here is another hook example ("cascade" case like on images) but before test, please read setup notes: 1) For the first column field (continents / categories) set parent page inside field setup. 2) For subfields (country and city) set template (eg. "blank") inside field setup. 3) Write selector strings for subfields inside hook configuration (ready.php). PHP (ready.php) <?php namespace ProcessWire; /** * Configuration: * Field names and selectors * * For subfields and after save problem * need to write string selectors here, and leave empty * that part inside field setup. */ $config->names = array( 'continent' => '', 'country' => 'parent=page.continent', 'city' => 'parent=page.country', ); $wire->addHookAfter('InputfieldPage::getSelectablePages', function ($event) { $inputfield = $event->object; $field = $inputfield->hasField; $names = $this->config->names; if (isset($names["$field->name"])) { $selector = $names["$field->name"]; if (trim($selector) !== "") { if (strpos($inputfield->name, '_repeater') !== false) { $id = str_replace($field->name . "_repeater", "", $inputfield->name); foreach ($names as $n => $s) { if (strpos($selector, $n) !== false) { $repeater_name = $n . '_repeater' . $id; $selector = str_replace($n, $repeater_name, $selector); } } } $inputfield->findPagesSelector($selector); } } } ); Here is screen record: Regards.
  36. 1 point
    No, it's not. The title field can be removed from the page. so it's not included by default. In your graphql documentation, does your page reference fields has a title field in them?
  37. 1 point
    See the module config for Page Edit Image (which is the Process module used by the PWImage plugin):
  38. 1 point
    I am currently working on 2 large modules (SnipWire and GroupMailer). The further the development progresses the more complex it is to fully support the 3 main themes (UIKit, Reno and Default). What do you think: is it worth the effort or will the older themes soon disappear? Should I concentrate on UIKit only? How do you handle this with your modules?
  39. 1 point
    If you're serious about performance and don't have http2 available, you can optimize a lot with resource hints and service workers + cache API.
  40. 1 point
  41. 1 point
  42. 1 point
    I need to take a look at that, but unfortunately, I'm not hopeful that I'll find enough time this week. Next week should be a bit less crazy though. I haven't found the time to update to the latest FB release, but it looks like soon will be a good time to do so ๐Ÿ™‚ Stay tuned.
  43. 1 point
    The Inputfields JS API is really cool, thanks @ryan! What do you think about adding a feature so that some (all??) of these JS functions could be triggered via URL query string parameters? As per my request here it would be neat to be able to create links (e.g. modal) to a form that automatically show/hide/highlight/etc particular fields.
  44. 1 point
    Here is a more detailed answer with the steps you have to take: Download the ProcessWire Zip (or use one of the other install methods) Unzip the file in your web root and rename it to the name how your project should be named Open Laragon control panel Click "reload" button for Apache This automatically creates a virtual host with the name of your folder like "processwire.dev" (I don't remember what is the default domain of Laragon, because I changed it to .localhost) You can then navigate in your browser to this URL You will see the ProcessWire installer and just have to follow the steps
  45. 1 point
    I use an IDE and found it stressful to have to work-around deploying config.php This is how I found your thread. Thank you! I integrated your solution into my own workflow and came up with this to share back here: /site/config.php (like @bernhard except last line) // include config file from outside of the repo $client = 'config-' . end(explode('/',__FILE__, -2)); include("../$client.php"); The PHP end() function and the minus 2 in the explode(), always gets the URI domain base. (As long as PW keeps it there.) Since my usual deployment flow is from ABC.dev -> test.mybox.com/ABC -> ABC.com ...in my root folder, safely out of reach (like @bernhard's concept), I then create 3 files each containing config deployment differences. ../config-ABC.dev.php and ../config-ABC.php and ../config-ABC.com.php For those also using PHPStorm, since these files are located out of project, I would add them in Favorites. (And add it's root folders in Deployment Mappings). I can then easily make use of IDE features like "Compare Two Files", "Sync with Deployed to", etc. Removing doubts about what config property I may have missed across the board. No more stress.
  46. 1 point
    @valan You need to include both the autoloader from Composer and the ProcessWire bootstrap file, see Bootstrapping ProcessWire CMS. Assuming your autoloader lives under prj/vendor/autoload.php and the webroot with the ProcessWire installation under prj/web/, you can use the following at the top of your script: # prj/console/myscript.php <?php namespace ProcessWire; # include composer autoloader require __DIR__ . '/../vendor/autoload.php'; # bootstrap processwire require __DIR__ . '/../web/index.php'; ProcessWire will detect that it is being included in this way and automatically load all the API variables (and the functions API, if you are using that). Keep in mind that there will be no $page variable, as there is no HTTP request, so there is no current page.
  47. 1 point
    An update to the hook in the first post for PW v3.0.117 or greater. // Add a new 'chunk' method to WireArray, the equivalent of PHP's array_chunk $wire->addHookMethod('WireArray::chunk', function(HookEvent $event) { /* @var WireArray $wire_array */ $wire_array = $event->object; $size = $event->arguments(0); if( !((int) $size > 0) ) throw new WireException('WireArray::chunk requires an integer $size argument greater than zero'); $chunks = new WireArray(); for($n = 0; $n < count($wire_array); $n += $size) { $chunks->add($wire_array->slice($n, $size)); } $event->return = $chunks; }); This returns the chunks as a WireArray so you have the option of using WireArray methods. So if needed you could do something like: $items = $pages->find("template=foo"); $chunks = $items->chunk(5); $three_random_chunks = $chunks->find("limit=3, sort=random");
  48. 1 point
    Please test your query in a Graphiql. Insert your query in the Graphiql and confirm that the "product_single.list" is an array of nulls. Now remove every field inside the list and leave "id" and confirm that the list now contains objects with single "id" property in it. If that was successful then keep adding your "product_single" fields one by one. Whenever you see that the list is an array of "null"s, it means that exact field is causing this issue.
  49. 1 point
    Unfortunately I haven't had much time in optimization for this module. I'm very busy so can't promise any timelines when this will happen. The only thing you can do now is to keep your graphql schema as small as possible by unchecking all the unwanted fields and templates in the module config page. There is supposed to be a way to cache the schema (https://github.com/youshido-php/GraphQL/pull/37) I was planning to look into it. But never had a time for it and thus is not implemented in this module yet.
  50. 1 point
    There is not need for different endpoint for users with different roles. The module does not have any authentication/authorization logic on it's own. The users that will be able to authenticate with this module are the same users in your ProcessWire installation. When I mentioned implementing authentication, I was talking about logging in via GraphQL api, like via AJAX. In reality it will be the same $session->login('username', 'password'), nothing more. No, no. Of course not. I am sorry for the confusion here. Legal templates mean legal for the api. It does not mean it will make it available to the public. Like I mentioned earlier the module checks if the requesting user has permissions to view, edit, create and etc. If say you select user template as legal. It does not mean it will be public. It means it is available via api to those who are authorized to view it, authorized via ProcessWire's access control system. I personally don't think there is even a need for the legal templates option. But it is helpful if you have too many templates and selecting only few can reduce the schema size and make api faster. I think there is a bit confusion about this. I want emphasize that this module does not make any data public, nor does it anything private. That is not the module's concern. The module's job is to make your data available in a JSON format, in addition providing the ability to consume that JSON data via GraphQL api. If the user does not have permissions to view a certain page according to ProcessWire's access control system then he won't be able to fetch it. The same goes for fields. When implemented the user will be able to access only those fields that he is authorized via ProcessWire's access control. But I will add an option for legal fields also, because that also could help reduce the initial schema size.
  • Create New...