Leaderboard
Popular Content
Showing content with the highest reputation on 10/31/2019 in all areas
-
After looking to it a second time, one may come to be able to see the not so sad truth, that is: With ProcessWire we have an opensource project on a very high level in regards of code base, stability & homogenity and much much more along those lines. AND all of of this is directly related to Ryan's decision to *work through all pullrequests* himself to deeply understand, modify, and adapt the code, so that he himself is ALWAYS & IMMEDIATELY able to fix bugs resulting from those code changes. (Even after years, when maybe some people who have sent PRs have left the project again and are no longer reachable.) This has a lot of advantages! And it has, (as everything has), some cons. One of them is, that he is something like a OneManCodingArmy :-), but he is only *one* man. And I don't want him to waste his time to read through every github issue, plus every github pullrequest AND ANSWER TO EVERY ONE of them, in order to explain "why he doesn't want to do it that way, or that he doesn't have time now to do it, or that it could produce a lot of side effects, or, or, or". And one of my fantasies is that he might already be unhappy about not having the times to be carefree active here in the forums, as it was possible for him until about 4-5 years ago. It might feel ungrateful for him to read such a post. This, as a result of his disciplined behaviour, to advance the project as far and effectively as possible. Every week, or almost every day. (( @ryan Did you imagine or wish this when you turned your code into an open source project in 2010? I'm just kidding! But it may sometimes be tiring to be confronted with the same thing over and over again, when the answers have already been given many times and the internet supposedly doesn't forget anything. But when people "don't have time" to do a little research first, or try to look at it from a different angle before, but (in the worst case without any impulse control) always bring up the same things again. Pffhhhh, for my well-being that would be nothing. ? I want you to have time and energy to work in your own flow & rhythm on *your* ProcessWire. Your ProcessWire, that you gifted to us. ? )) @bernhard The truth is, (not the sad truth, not the happy truth, just the truth): it's one of two possible choices that he took 10 years ago. With all the pros and cons. In my opinion, every member of the community should respect that and never forget it. Because all that we have learned to love and appreciate about ProcessWire, all that has enabled us (even in early days, when we may not have had much code experiences) to write our own modules, is the result of that decision and I wouldn't want to miss it. The alternative would be to abandon this course and (quality) control. But all the people I've spoken to in the past, all of whom have more than 15+ or 20+ years of experience in the software business and open source sector, have consistently told me: "Be glad that it is this way. There were so many projects that started that way, but opened up and broke 1 or 2 years later." And about @netcarver question: I have contributed a lot of stuff in regard of image handling in PW. But it seems that less then 5% of it is reflected in githubs contributors list. The most things, where Ryan included my PRs as is, we have had conversations and colaborations about and on it on github or private via PM or email, until the code was accepted by him (in regard to his principles, anounced above). Aaand, it could be, that it also has something to do with the fact that he not only made the experience that I am still approachable after 6 years when it comes to issues, decisions or questions, but that I also not only understood his decision, but also respect it. Even if it has a negative effect on me in some areas. (But that's also just a fantasy of mine, with no claim to truth.) ?6 points
-
Hi @bernhard, @rjgamer Thanks for the comments - I share some of the frustration you are voicing - but I'm only able to handle issues on the processwire-issues and processwire-requests repos. I don't have admin rights on the main processwire code repo so I can't take any action on PRs, even if I wanted to. Perhaps we could invite @horst to also comment here as he is the only member of the community who I feel has been successful at having bulk code submissions adopted into Processwire.4 points
-
I think this is the crux of it - it's mostly a communication issue. It's not surprising that people come to PW with an experience of seeing how some other open-source GitHub-hosted projects are managed and expect that it's the same for PW. Many projects encourage the user base to submit pull requests. However, PW is not one of those projects and this probably needs to be communicated more clearly somewhere. Open-source is not one thing but many things depending on the project and those who manage it. My impression is that PW is open-source in the sense of "a very smart person made this software and you can use it for free and also modify it to suit your needs". But it's not open-source in the sense of "hey everybody, let's collaborate on writing code for this software". There will be pros and cons to the different approaches to managing an open-source project, but all things considered I think most would agree that the formula Ryan is following has proven very successful to date.3 points
-
Yes, like this. But at a prominent spot. At the moment we have this in the contributing guidelines (that are only shown on the issues tab btw): There's no hint at all on the PR tab:3 points
-
If your PR addresses an issue, rather than a feature, then one approach to the logjam would be to post your Pull Request on processwire/proceswire as normal, but then to add a new issue on processwire-issues that links to it. I can then tag your issue as "contains a fix". Hopefully this will put it on Ryan's radar. I've done one example of how this might work: https://github.com/processwire/processwire-issues/issues/1016 Similarly, if you create a PR for a feature, then there is nothing preventing it being referenced by a new issue on processwire-requests. I really wish this were more frictionless, but it's all I can think of at the moment.3 points
-
The sad truth is that ryan seems to ignore them ? I've mentioned that several times but all of my questions where handled like pull requests: ignored. Maybe @netcarver can tell us something more about that topic, as he is taking care about the pw-issues repo. Thx for that btw! ? Ryan has already pulled in some PRs - it just takes a little time sometimes but he has stated that he is happy to get contributions!3 points
-
I get your point @horst and what you describe is perfectly fine, but IMHO it wouldn't be a sad truth if it was communicated that way... --> "not-sad-truth" ? --> invest time for PRs --> PRs are ignored --> sad truth ? There are really small PRs that could be easily implemented within no time (eg https://github.com/processwire/processwire/pull/138/commits ). I understand, that checking all PRs can cost a lot of time, but that could be done by someone else just like @netcarver does it for the issues repo. Someone could tag simple fixes and ryan could then just work through PRs having some kind of label.2 points
-
That's not only for PW development but if you've never tried the remote development feature of vscode you should definitely check it out! I'm using it for all SSH related stuff now (server administration) and it's been an awesome experience so far. Compared to the console you get a lot of benefits: open any file directly in vscode for editing ( "code foo.txt" will open foo.txt in vscode ) upload files via drag&drop, download via right click add different folders to your workspace (eg you can attach /var/www/vhosts and /etc/apache2) use ctrl+p to quickly search for files use the GUI to quickly search for any text in any files/folders get a full and awesome GIT integration (+GUI) extremely easy setup, just download the extension, add a host (host + user) and it works (using ssh keys) In the left bottom corner you can see that I'm connected to a remote host. Working on it is just as if it was your local machine ? Intelephense does not work, but I develop locally anyhow and for all server administration stuff there is really everything I need.2 points
-
I use: http://modules.processwire.com/modules/fieldtype-phone/ ?2 points
-
Actually, for href the correct format is +49 (country prefix). The leading numbers don't matter (same as for the leading zero after the country prefix). I know I could use an HTML5 regex pattern, but actually I just do an instruction text below the input field, with an example.2 points
-
Hi guys, I recently visited GitHub, researched the source code of ProcessWire and created a pull request for a small typo fix. But what I saw did not make me really happy. ProcessWire has a huge list of mostly small but usefull pull requests which are all open. https://github.com/processwire/processwire/pulls?page=1&q=is%3Apr+is%3Aopen Why is this? If they are not usefull, why are the pull requests not getting closed? Best regards, rjgamer1 point
-
Hi, maybe I've found a bug, but there's a behavior I can't explain: I'm trying to hook into Pages::saveReady with following code example: https://processwire-recipes.com/recipes/extending-page-save-process/ <?php /** * Hook the saving of pages to add own processes. * * ProcessWire 2.x * Copyright (C) 2014 by Ryan Cramer * Licensed under GNU/GPL v2, see LICENSE.TXT * * http://processwire.com * */ class HookAfterPagesSave extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'HookAfterPageSave', 'version' => 1, 'summary' => 'Hook the saving of pages to add own processes.', 'singular' => true, // Limit the module to a single instance 'autoload' => true, // Load the module with every call to ProcessWire ); } public function init() { // init() is called when the module is loaded. // saveReady is a hook after processing the previous changes of the page, // but just before those changes are saved to the database. // It's called for each page that's being saved, no matter if it's in // the backend or in your templates via the api. $this->addHookAfter('Pages::saveReady', $this, 'afterSaveReady'); } In the afterSaveReady() function I'm trying to get the language property of the user who saved that page, but instead of returning the correct user language the default language is always returned. <? public function afterSaveReady($event) { $userLanguage = $this->user->language; bd($userLanguage); $this->message("User Language: ".$userLanguage); }; Here's the output and a test with the console of TracyDebugger Any ideas? Should I open a ticket here: https://github.com/processwire/processwire-issues/issues ? Many greets!1 point
-
1 point
-
Which tab is initially activated depends on the chosen user language. See \wire\modules\LanguageSupport\LanguageTabs.module line 69: // determine the index of the tab for the user's language $activeTab = 0; foreach($this->languages as $index => $lang) { if($lang->id == $language->id) $activeTab = $index; }1 point
-
I leave that to the browsers. Most mobile browsers do convert automatically a phone number to a phone link. So only if you want to offer phone links to desktop browsers, you need to insert the link manually. Edit: Ok, not most browsers. Safari does convert phone numbers, but others don't, it seems. So a link is safer.1 point
-
Bug report filed here: https://github.com/processwire/processwire-issues/issues/10151 point
-
ProcessWire API Visual Studio Code Snippets Here is a Gist of all (?) ProcessWire public API snippets for VSC. This is generated from the ProcessWire Cheatsheet. Some stuff needed manual cleanup. I also removed the stuff from the selectors section. I could have missed something, please let me know. Please note this is a complete, well-formed JSON file. If you need to copy to your existing VSC snippets file (most likely your php.json), remember to remove the top and bottom outermost curly braces. One great thing about VSC is that it doesn't care much about typos; fuzzy search will find what you meant to type. E.g., 'cnf' will match 'config'. Maybe the JSON file is too long, I don't know, but sometimes the snippets' descriptions don't show up. The snippets are for use in a template file (i.e., no auto $this->), but you can still use it in a module and/or modify it to suit such needs. Hope you find it useful :-). Demo1 point
-
nothing fancy here. you see it's not polished and some hardcoded values... the javascript to handle the clicks: $(document).on('click', '.ckesnippet', function() { // find correct ckeditor instance $field = $(this).closest('li.Inputfield'); var id = $field.attr('id'); var ckename = id.replace('wrap_',''); var cke = CKEDITOR.instances[ckename]; var data = cke.getData(); cke.setData(data + $(this).data('snippet')); return false; }); and the hook to modify the field: $this->addHookBefore('InputfieldTextarea::render', $this, function($event) { $field = $event->object; if($field->name == 'rockinvoice_suffix') { $del = ''; foreach($this->wire->pages->get(38967)->texttemplates as $item) { $field->entityEncodeText = false; $field->description .= $del . '<a href="#" class="ckesnippet" data-snippet="' . str_replace(PHP_EOL, '', $item->body) . '">' . $item->title . '</a>'; $del = ' | '; } } elseif($field->name == 'rockinvoice_prefix') { $del = ''; foreach($this->wire->pages->get(38967)->texttemplates_greeting as $item) { $field->entityEncodeText = false; $field->description .= $del . '<a href="#" class="ckesnippet" data-snippet="' . str_replace(PHP_EOL, '', $item->body) . '">' . $item->title . '</a>'; $del = ' | '; } } $this->wire->modules->get('RockTools')->loadAsset('ckesnippets.js', 'HrDiamonds'); }); and a repeater to setup the snippets:1 point
-
If you are using cloudflare.com you might also want to create a page rule like: *mydomain.com/processwire/* Security Level = High Cache Level = Bypass Disable Apps Disable Performance This should prevent any of the Processwire admin from being proxied by cloudflare.1 point
-
Hi, I just wanted to point out that we recently ran into the same issue when using Cloudflare's CDN. Weird is the fact that we were able to reproduce the logout issue with a specific user when editing a specific page. Every time the user clicked "Save" for this specific page, she was kicked out. I assume that at this point the IP address changed - from Cloudflare to the actual user's IP address or the other way around. The error is the same as in the quoted post above: User 'somebody' - Error: Session fingerprint changed (IP address or useragent) (IP: 162.158.XX.XX) The IP address is - just as above - in the Cloudflare range: https://www.cloudflare.com/ips/ We are currently working around this issue by using a different Domain name to access the ProcessWire backend. This domain is not routed through Cloudflare and the approach works fine for us so far. I can provide further information if required.1 point