Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 01/25/2018 in all areas

  1. 8 points
    I love ProcessWire. @ryan has done such a fantastic job and I'm sure is incredibly proud. I agree with some of the other members here that a goal of 2018 should be better community and project management in order for the community to grow and be part of the larger web development community. We do have our own way of doing things here which is fantastic, and the accessibility of ProcessWire is on point, but I fear we do lack some elements that can position us more, for lack of a better term, professionally. Here is my suggested list of priorities: Long-Term Vision: What is the long-term vision of PW? All the rest of my suggestions are coming from my long-term vision of how I wish to use PW, how I want PW to be seen by my clients and how I want PW to be viewed by other developers. But if Ryan doesn't want PW to get too big, if he doesn't want his role to become more and more of a manager and less of a sole developer role then that is fine. I can see a potential future where PW runs itself, where we have set up a structure for a team to surround Ryan, the community grows and lots of people buy Pro Modules =D New Website & Documentation: First impressions count, a consistent and modern site will help PW look like a real legitimate offering from the offset. Wouldn't it be fantastic if the ProcessWire website was open-source on Github - as the perfect demonstration of PW itself. Documentation needs to be positioned as a source of truth instead of scattered across multiple blog posts / forums posts. The API CheatSheet is great but we documentation also needs to provide standards and methodology for some of the most common solutions people build with ProcessWire. The MeteorJS Docs are a fantastic example - they include a full API breakdown as well as a guide for common areas such as Application Structure, Data management, user accounts etc. https://docs.meteor.com/ Importantly they are open-sourced on Github, so the community can contribute. Project & Community Management: Continuing from the above this should not all be put on @ryan's shoulders. I think much of the website and documentation above can be handled by the community once the initial setup is there. Slack Channel: We're modern so let's have a modern Slack channel. Team Members: Let's take some of the talented members of the PW community and give them a role if they want it. Who triages the Github issues, who can speak on behalf of the PW project that isn't Ryan? One Github Repo for PW: I don't understand the multiple repos for different things. Most projects don't go down that route? Contribution Guidelines: How to contribute to Processwire core. What are the coding standards, what issues can people currently contribute to? Open up the shop: Pro Modules should be available to the public, modules like Padloper should get seen on the PW site - after some requirements are met. Developers should have an easy access to earning from supporting PW instead of just consuming PW. PW should take a tiny cut of sales as well Stability and Modern Practices: If PW is to be part of the larger ecosystem we have to play on some of their terms. There has been great progress with this with Namespaces, and the new Admin theme etc. We should definitely focus on fixing some of the small issues that others here have mentioned and the development cycle. We should definitely be supporting NGINX as a first party citizen. On a side note; is PW unit tested? This is a big thing for larger developers. Anyway, I love ProcessWire but I feel that the community is actually quite fragmented, each of us doing our own thing in our own way in silos where the only commonality is that we consume the same framework. Lastly, @ryan - set up a PW Patreon. I'd happily subscribe in order to help support the development of PW technically as well as the project and community.
  2. 4 points
    This is the most important thing to me. If we keep having these conversations then let us solve the root cause. How can we as a community help Ryan more? We need Ryan to help us create some frameworks and models for us to help him out. As there is a barrier of entry for us to help him. This framework can then be used for us to achieve whatever we need to (be it website, documentation, pro modules etc), with a sense of direction.
  3. 3 points
    Hi! I've had a problem with uploading PNG files into Image field. I've had an error: Error: Uncaught Error: Call to undefined function ProcessWire\utf8_encode() in /var/www/domain.com/public_html/wire/core/PWPNG.php:117 Stack trace: #0 /var/www/dksb.turala.com/public_html/wire/core/PWPNG.php(31): ProcessWire\PWPNG->_parsepngstream(Resource id #155, 'image.260x...') #1 /var/www/dksb.turala.com/public_html/wire/core/ImageInspector.php(203): ProcessWire\PWPNG->loadFile('/var/www/domain...') #2 /var/www/dksb.turala.com/public_html/wire/core/ImageInspector.php(129): ProcessWire\ImageInspector->loadImageInfoPng() #3 /var/www/dksb.turala.com/public_html/wire/core/ImageSizer.php(102): ProcessWire\ImageInspector->inspect('/var/www/domain...', true) #4 /var/www/dksb.turala.com/public_html/wire/core/Pageimage.php(479): ProcessWire\ImageSizer->__construct('/var/www/domain...', Array) #5 /var/www/dksb.turala.com/public_html/wire/core/Pageimage.php(346): ProcessWire\Pageimage->___size(260, 0, Array) #6 /var/www/dksb.turala.com/public_html/wire/core/Pageimage.php(632): ProcessWire\Pageimage->size(260, 0, (line 117 of /var/www/dksb.turala.com/public_html/wire/core/PWPNG.php) In this case I've had to install PHP-XML library for PHP-FPM deamon. On CentOS 7 it's: yum install php-xml And after that I've had to restart PHP-FPM deamon: systemctl restart php-fpm I hope this solution will help others with the same problem.
  4. 3 points
    Hi @Gideon So, What you ask can be done. Is it possible? Yes. What is needed? This is the kicker. Obviously it depends on your application requirements, and what you want to incorporate as 'progressive'. Take a cell phone provider application as an example. I use a top level page for the process module. Under which is a page for each cell phone provider that contains specific cell phone provider information, such as url, plan rates, etc. Under those pages are the pages for each application subscribed user that contains specific information about that user regarding that specific provider, such as password, services used, etc. Also under the process module is a history page for each user which tracks their application usage history. Cellphone Process Module - ATT -- User A Provider page - Verizon -- User A Provider page -- User B Provider page - Sprint -- User B Provider page - History -- User A History page -- User B History page This allows me to have a template for each provider, and a template for each user of that provider. Making changes to each template is relatively simple to reflect those changes in your code. I don't use cookies to track usage simply because it won't be available if the user changes devices. You could however use cookies as a temporary storage and write the data to the history page on each user selection. You can get very complicated very quickly tracking user history so I would start off simple at first. What article/image/ad was displayed at what time. Did the user click any creative? If so, at what time? Did the user page through the complete article or stop mid-way? etc. There are many utilities available to provide a smooth UI experience, but I don't use many of them simply because it is not worth the data load to me. That is entirely up to you as to how fancy looking you want to make the UI. I tend to use javascript only to ensure the user doesn't submit a form more than once, provide initial validation, etc. This is a simplistic answer, but I hope it gives you food for thought.
  5. 3 points
    Great post @StanLindsey I had exactly the same thoughts... Regarding slack - I'm also not a fan, but it seems that many are... there was also one try to get a pw slack channel running two years ago: https://processwire.com/talk/topic/11475-processwire-slack-channel/
  6. 3 points
    Sorry to sound like a broken record, but CroppableImage returns a pageimage object, not a url, so you need to add ->url to the end of that: <img src='{$child->overviewimg->eq(0)->getCrop('thumbnail')->url}' alt='$child->title'> If you take a look at the HTML source of the page you would have seen that it was return an ID and not a URL to the image. Also another tip is to use the Console Panel in Tracy to investigate things. In particular note what happens when you echo (which outputs a string) that it returns the filename, but not the URL.
  7. 2 points
    Seems I needed this at the same time as other ProcessWire devs. Timely! This module is simply a ProcessWire module wrapper for the PayWhirl API and being the initial release, may have a few unforeseen hiccoughs. Please be gentle with me when reporting any problems. As with all API's make certain your ducks are all lined up with the vendor first, in this case PayWhirl -https://app.paywhirl.com/ Download the module from GitHub at https://github.com/clipmagic/PayWhirlAPI Download the module from ProcessWire modules at http://modules.processwire.com/modules/pay-whirl-api/
  8. 2 points
    I can confirm now that IFTTT works with GitHub's atom feeds. Just got a bunch of mails in my inbox
  9. 2 points
    I'm very well versed in MS SQL Server but not as much in MySQL. But the underlying principles are the same. Pretty succinct explanation here https://www.sitepoint.com/using-explain-to-write-better-mysql-queries/ And to get in deeper https://dev.mysql.com/doc/refman/5.5/en/using-explain.html It may also beneficial to create indexes for some of the fields you're joining with (e.g.efforts.data, pages_id) but best to verify with a query plan using the Explain command as above to verify your mileage. Indexes with low cardinality (i.e. low number of unique values) usually perform worse than not having any indexes at all.
  10. 2 points
    I've never really built a progressive web app, so this answer may be silly. Not having experience with them, I only know the basics, and am not aware of the best practices. Disclaimer out of the way, Processwire's best feature is the flexibility of what you can make with it. I've made web-apps that mimic the look and feel of an actual app, and I've made single-page web applications that load content through Ajax calls. You can very easily set up a page template that grabs content of the POST variables, does its thing and outputs whatever you want, be it JSON, XML or just a chunk of HTML to feed into a <DIV>. If your frontend is able to read that output and display it, you're good to go.
  11. 2 points
    See the explanation at https://processwire.com/blog/posts/hello-pw3/#new-github-repositories If Ryan would only be the manager, he would be bored, I think. He just loves to code We've had this sort of conversation multiple times. I believe we all would love to help but we just don't exactly know how.
  12. 2 points
    To clarify - if the community at large disagrees with something (e.g. Slack) then its something to put more thought into. The primary reasoning for suggesting it is that its a common and in some ways expected in modern circles. It wouldn't replace the forum. So anybody who doesn't want to be part of it wouldn't have to be. Long form content is much better suited to the forum. It would have to be supported first-party. The PW Slack Channel, "Find us on slack" on the official PW website etc. Not a sub-channel on another team's Slack group that you have to find by searching through the forum posts. Though the sentiment is definitely welcome, it's not about the existence of the thing, it's about the supporting arms around the thing. (Be it Slack, Documentation etc) But quickly - that is one point on that list and not an overly important one. If we can instead discuss the things we really do want instead of the discussion turning towards moot points we'll get more headway in convincing the community. =D
  13. 1 point
    NOTE: This thread originally started in the Pub section of the forum. Since we moved it into the Plugin/Modules section I edited this post to meet the guidelines but also left the original content so that the replies can make sense. ProcessGraphQL ProcessGraphQL seamlessly integrates to your ProcessWire web app and allows you to serve the GraphQL api of your existing content. You don't need to apply changes to your content or it's structure. Just choose what you want to serve via GraphQL and your API is ready. Warning: The module supports PHP version >= 5.5 and ProcessWire version >= 3. Links: Zip Download Github Repo ScreenCast PW modules Page Please refer to the Readme to learn more about how to use the module. Original post starts here... Hi Everyone! I became very interested in this GraphQL thing lately and decided to learn a bit about it. And what is the better way of learning a new thing than making a ProcessWire module out of it! For those who are wondering what GraphQL is, in short, it is an alternative to REST. I couldn't find the thread but I remember that Ryan was not very happy with the REST and did not see much value in it. He offered his own AJAX API instead, but it doesn't seem to be supported much by him, and was never published to official modules directory. While ProcessWire's API is already amazing and allows you to quickly serve your content in any format with less than ten lines of code, I think it might be convenient to install a module and have JSON access to all of your content instantly. Especially this could be useful for developers that use ProcessWire as a framework instead of CMS. GraphQL is much more flexible than REST. In fact you can build queries in GraphQL with the same patterns you do with ProcessWire API. Ok, Ok. Enough talk. Here is what the module does after just installing it into skyscrapers profile. It supports filtering via ProcessWire selectors and complex fields like FieldtypeImage or FieldtypePage. See more demo here The module is ready to be used, but there are lots of things could be added to it. Like supporting any type of fields via third party modules, authentication, permissions on field level, optimization and so on. I would love to continue to develop it further if I would only know that there is an interest in it. It would be great to hear some feedback from you. I did not open a thread in modules section of the forum because I wanted to be sure there is interest in it first. You can install and learn about it more from it's repository. It should work with PHP >=5.5 and ProcessWire 3.x.x. The support for 2.x.x version is not planned yet. Please open an issue if you find bugs or you want some features added in issue tracker. Or you can share your experience with the module here in this thread.
  14. 1 point
    I'm considering purchasing FormBuilder for out corporate intranet to re-implement a decent number of forms. I've got a solid (albeit optically a bit outdated) form template solution that I built 12 years ago (I love seeing that number) and integrated into PW at some point. Since I'm up to my neck in work (and going to be that for quite some time), FB could be a means to quickly offload some work to colleagues since the old solution has text based templates and thus a bit of learning curve. A lot of our forms will need repeating rows, though. Thus, the question: does FB support repeaters (text/number fields would be enough), or some other type of repeatable field groups?
  15. 1 point
    @bernhard - not sure if this is useful or not, but it shows you the SQL that the PageFinder uses for a given selector.
  16. 1 point
    Check file in attachment, that should rename all your existing files to the new [please do read instructions carefully, make sure you have a back-up] BTW, I didn't write it, but I have used it a few times, with success. also, new syntax is + ->url So, I guess in your case: <img src='{$child->overviewimg->eq(0)->getCrop('thumbnail')->url}' alt='$child->title'> Hope this helps.... cropupdate.php This is because, when changing from 'CropImage' to 'CroppableImage3', you actually have to re-enter the Crop Settings, in your case 'thumbnail'
  17. 1 point
    Sorry for the drama... I guess I could just wrap the whole hook in an if ($user->hasRole())... got it.
  18. 1 point
    https://processwire.com/blog/posts/pw-3.0.86/
  19. 1 point
    If you've seen Verride Hotel, you've seen this layout before: http://restaurantecriatura.pt/en/ This is one of the restaurants in Verride Hotel in Lisbon. It uses the same base layout for the master site, with some new stuff here and there. Both opened doors this week so you can start making your reservations
  20. 1 point
    I hear you Rick. And the menu font is a bit too slim for my taste as well, but I just code on this one Wouldn't mind dining there tonight myself.
  21. 1 point
    Support for progressive JPGs is integrated into the Dev version. I think it is there since 3.0.80, but don't know exactly. To use it put this into your site/config.php $config->imageSizerOptions('interlace', true);
  22. 1 point
    Each page can be restricted to a user role, so you could setup each page to be limited to a different role and assign these roles to separate users - I think this would give you what you want. But without knowing exactly your scenario, it's hard to know if this would be the best option or not. You might be better off with a custom module or a ready.php hook on Page::render and handle the logic that way.
  23. 1 point
    While I generally agree to all the other points raised, I would be cautious with Slack. To tell the truth, I'm barely familiar with Slack but what I've seen so far (and that was about two years ago, so things might have changed) communication in Slack is very fragmented and hard to follow. On the contrary, our current forum has a lot of power in it and is very easy to follow. Maybe Slack can do the same but it is a question whether it is preferable or not.
  24. 1 point
    Ok thanks Tracy is great
  25. 1 point
    Ok will follow up this time and next time avoid double post
  26. 1 point
    From the video, it looks like you have uBlock origin enabled. Try disabling it for that site and see if that fixes the issue.
  27. 1 point
    @BitPoet Thank you, this works Inputfield_title__1039 !="" Also works without the Inputfield prefix
  28. 1 point
    @bernhard , have you looked at the query plan for both SQL statements using a profiling tool or SQL Management tool? I had a quick look at your SQL and the type of select query you're doing (lots of fields from lots of tables), an inner join is (almost) always going to be faster than subqueries . There are instances where subqueries can be quicker than a join. If the subset of data returned by a Subquery is much smaller than if the table was used in a join query, (1000 rows vs a million row table for example) than this is where Subqueries can really shine. I'm guessing your tables are not? If you can also use EXISTS, NOT EXISTS statements with a subquery, it's probably a good candidate as well because of the aforementioned reasons. Normally, I'm a big advocate of readability of code but I draw the line on SQL because very often this is the place for bottlenecks for entire applications & workflows and it's the one place where a poorly optimised query can really cause issues down the line in too many ways. More readable code which is less optimised might only cost you a ms or a few seconds. Poorly optimised queries can cost you hours and even days depending on the dataset. Proper indenting, good (SQL) coding standards and concise & detailed commenting can go a long way to improve readability of those yucky joins
  29. 1 point
    Glad to hear Then all that's left is a webserver or hostname lookup configuration issue. Probably related to IPv6. Disabling IPv6 in the web server may be enough to fix this.
  30. 1 point
    @mikhail The Fieldset field can also be used to achieve that.
  31. 1 point
    Yes, its called MySQL Query Cache To disable it for a connection : SET SESSION query_cache_type = OFF; More details there : https://www.dbrnd.com/2015/08/mysql-query-cache/ https://www.dbrnd.com/2015/08/mysql-query-cache-configuration/
  32. 1 point
    Offtopic: if you happen to use adminonsteroids module you can enable a simiar tweak: https://github.com/rolandtoth/AdminOnSteroids/wiki/Misc
  33. 1 point
    Hi, you can hook into createdUser : wire()->addHookBefore('LoginRegister::createdUser', function($event) { $u = $event->arguments[0]; $u->roles->add(wire('roles')->get("custom-role")); $u->save(); });
  34. 1 point
    It's not that I think the PW admin isn't easy, but there are lots of scenarios where users don't need to edit site content in any big way and seeing the PW admin would confuse them more than anything. Like where your users just have an account so they can access a private "members" area, or view "premium" content, etc.
  35. 1 point
    Via a custom front-end login form. I think that's how most of us have been dealing with front-end logins (until the LoginRegister module came along - I haven't had the chance to use it yet). Well, it's not unusual. Guess it depends how many sites you build that service front-end users.
  36. 1 point
    Haven't seen that before. Any browser adddons that may mess with the backend js? Any errors in the js console when the issue happens?
  37. 1 point
    I think theres a Problem with your user rights. You have a Database "itinffcl_kwbdm" (Screenshot), and your backup create (or trys to create) a database with the name "lwteswm664_ltingesjfo_itbd". Your user have no rights to create a new database. I think you want to import the backup to the "itinffcl_kwbdm" database? If you just want to import the data, you have to delete the CREATE DATABASE command inside of your backup file. Or you can change the Database name inside of your backup from "lwteswm664_ltingesjfo_itbd" to "itinffcl_kwbdm"...
  38. 1 point
    Just tried this morning on a completely fresh install, no prepended files, no extra modules etc. Created a basic structure just with basic page and included "_main-menu.php" which shows the issue of running $pages->children twice: <?php namespace ProcessWire; $root = $pages->get("/"); $topLevelsFirst = $root->children(); $topLevels = $root->children(); $topLevels->prepend($root); ?> <ul> <?php foreach($topLevels as $topLevel):?> <li> <a href="<?= $topLevel->url ?>"><?= $topLevel->title; ?></a> <ul> <?php foreach($topLevel->children as $topLevelChild): ?> <li><a href="<?= $topLevelChild->url ?>"><?= $topLevelChild->title ?></a></li> <?php endforeach; ?> </ul> </li> <?php endforeach; ?> </ul> ..which outputs: ...and <?php namespace ProcessWire; $root = $pages->get("/"); $topLevels = $root->children(); $topLevelsSecond = $root->children(); $topLevels->prepend($root); ?> <ul> <?php foreach($topLevels as $topLevel):?> <li> <a href="<?= $topLevel->url ?>"><?= $topLevel->title; ?></a> <ul> <?php foreach($topLevel->children as $topLevelChild): ?> <li><a href="<?= $topLevelChild->url ?>"><?= $topLevelChild->title ?></a></li> <?php endforeach; ?> </ul> </li> <?php endforeach; ?> </ul> ..which outputs: So I must have $pages->children called earlier on the page somewhere (probably in the main menu above my test one) which would cause the double home link. I think @BitPoet was right earlier about the pointer. This would also be why @kongondo and myself were getting different output.
  39. 1 point
    Yes, that's the prefered way for those use cases.
  40. 1 point
    I don't think so. But I believe that you don't have the exactly same setup as @SamC, in which something, somewhere (a module, a prepend file, site/ready.php, whatever), already retrieves the children once before the code we see is executed. It's the only thing that makes sense. If you repeat code 2 in your test script, you'll get an output starting with 1|1|..., I'm pretty sure of that, so you can see the how, just not the where.
  41. 1 point
    The thing is, that isn't the code from the OP. To experience the issue I believe you need to have a minimum of three usages of the same PageFinder operation (in this case, getting the children of the root page). In SamC's original code there were two usages where the children of root are retrieved (showing different alternatives for doing the same thing) and then a third usage of the children of root within the foreach that generates the dropdown menu. An explanation of what I believe is going on (to the extent that I understand it):
  42. 1 point
    ProCache, Apache *hugahuga*.
  43. 1 point
    And it's not just children() but other (all?) methods that use PageFinder: Weird.
  44. 1 point
    We have it in use for years now on a very large site 400'000+ pages, no obvious issues so far.
  45. 1 point
    Yes, this is somewhat unexpected behavior and can be replicated with a short piece of code: $r = $pages->get('/'); $x = $r->children; $y = $r->children; $z = $r->children->prepend($r); echo $x . PHP_EOL; echo $y . PHP_EOL; echo $z . PHP_EOL; This outputs here: 1001|1005|1025 1|1001|1005|1025 1|1001|1005|1025 This illustrates that consecutive calls to children() return a pointer to the original PageArray while the very first call returns an independent copy. That's likely a caching thing, though I can't say if this is expected behavior. Tested with different versions of PW.
  46. 1 point
    Very good point! I was in the same boat with SilverStripe. They pushed the system in the direction so that one can practically use their workflow only, major version numbered system updates were not possible because of incompatible modules, etc... Part time developers like me just could not keep up the pace with the changes introduced. In contrast, ProcessWire "just" gets new features, upgrade issues can be sorted out, and breaking API changes are virtually non-existent. You learn it once, use it "forever" For example, I hate that when I need to re-learn M$ Windows/Word just because they completely redesigned the GUI. I'm on Mac$, anyway
  47. 1 point
    I guess you're committing major SEO sins here... You deliver the exact same content under several URLs / domains. Google is not amused by such practises. e.g. http://sprachspielspass.de/kinderlieder/alle-kinderlieder/ri-ra-rutsch/ http://kinder-reime.com/kinderlieder/alle-kinderlieder/ri-ra-rutsch/ http://finger-spiele.com/kinderlieder/alle-kinderlieder/ri-ra-rutsch/ This is called "black hat SEO", and frowned upon. I only discovered these other domains by checking your HTTP headers, where it says access-control-allow-origin: kinder-reime.com, finger-spiele.com, sprachspielspass.de
  48. 1 point
    You can't directly. But you could perhaps use a servcie like IFTTT and trigger a mail whenever new items are added to the commit feed. Github atom feeds can be retrieved by appending .atom to the repo (commit) URL, e.g. https://github.com/processwire/processwire/commits/dev.atom or https://github.com/processwire/processwire/commits/master.atom. Not sure if IFTTT works with atom, though.
  49. 1 point
    Welcome to the forum @FireDaemon Did you read this page? https://processwire.com/docs/security/admin/ Yes. In fact, during install process you are asked if you want to rename it. But you can do it later also. You could try this module. Yes That's already in core: see https://processwire.com/docs/security/admin/#preventing-dictionary-attacks In a test-environment, you can further add stuff like .htaccess allow/deny rules, i.e. only allow access from certain IPs.
  50. 1 point
    Your $thumbnail is already pretty handy - you could write somthing like $image->size(123, 456)->url but then you would have to repeat the size command all the time. Then, in your last example you have to put the "single-product-wrapper" into the foreach loop, since you want to wrap every product with it .... ‽ ... And what BitPoet said.
×
×
  • Create New...