Leaderboard
Popular Content
Showing content with the highest reputation on 04/19/2017 in all areas
-
It is now - please check the latest version just committed. It now support ML subject and body fields and the user will receive the version associated with the language that you set in their profile. Let me know if you find any problems.4 points
-
Hi, version 1.0.0 is released. The main changes are: project's name is changed to Tense (Test ENvironment Setup & Execution) Symfony/Console is used for colored output and arguments parsing config file uses YAML instead of JSON tense init command can be used for config file initialization waitAfterTests option renamed to pause3 points
-
2 points
-
@Peejay there are some more little improvements coming up but there are still a few annoyances. But there will be updates soon, sorry guys for the delays, but free time is sparse these days.2 points
-
I would like to say "Thank You" to each of you for responding to my post. I am a novice part-time developer (I am a full-time pastor) and love PW. This has been a great learning experience. I took the advice of several of you and installed a logging module. I was going to go with the profilerpro module but found the tracy debugger and thought I would give it a go. The logging is fantastic thus far. Below is what I found during another "blackout" DATE/TIME USER URL TEXT 33 seconds ago 2017-04-18 14:11:29 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 34 seconds ago 2017-04-18 14:11:28 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 35 seconds ago 2017-04-18 14:11:27 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 36 seconds ago 2017-04-18 14:11:26 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 37 seconds ago 2017-04-18 14:11:25 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 38 seconds ago 2017-04-18 14:11:24 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 39 seconds ago 2017-04-18 14:11:23 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 40 seconds ago 2017-04-18 14:11:22 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 42 seconds ago 2017-04-18 14:11:20 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 3 minutes ago 2017-04-18 14:09:11 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 3 minutes ago 2017-04-18 14:09:10 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 3 minutes ago 2017-04-18 14:09:09 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 3 minutes ago 2017-04-18 14:09:08 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 3 minutes ago 2017-04-18 14:09:07 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) Which has sent me on a chase regarding that error. It seems to be the wait_timeout or max_allowed_packet variables need to be configured to allow for higher amounts of data. Now, this obviously does not solve what is causing the variables to exceed their size limitations, but it is a start. My question now is, what is the significance of the "?" ? It's as if no page was being requested. I will keep Googling and awaiting replies. In the meantime I will take the following suggestions from the community: 1. I will take a closer look at the profiler pro module 2. I will limit my search functionality to make sure that isn't the cause 3. I believe the cacheing issue was because in a last-ditch-effort I turned on the Google Pagespeed Apache module, which does some goofy stuff I don't understand. I already use ProCache so to eliminate variables and slim down my code-funk I turned off Google Pagespeed and that could get the cacheing working properly again. 4. DaveP I don't fully understand the question, but I DO have several images being resized. Although, I believe I have correctly set things up to only resize on the SAVE of the template instance, not dynamically on a page load. So I don't THINK that is the problem, although I am swimming in deep waters here.2 points
-
One of PW 3.010's major novelty was the introduction of Horst's new image resizing engine that uses ImageMagick. Now I understand that ImageMagick can convert images to Webp, the image format that Google says can reduce image size up to 34% compared to JPEG. Mozilla is apparently adding support to Firefox, and even the Safari team is playing with it, so it looks like Webp is soon going to be available in most major browsers. If Horst's module can be extended to add Webp conversion, that would be a great addition to PW's already very powerful image manipulation arsenal. I'm currently using the free ImageEngine Lite to serve Webp images to supporting browsers, and the results are impressive. I routinely get images that are between 25 and 60% smaller compared to JPEG, with the same visual quality. I would love to eliminate the need to rely on a third-party service though.1 point
-
High Performance Browser Networking © Ilya Grigorik the complete book is online now for free reading: https://hpbn.co/1 point
-
Tense Tense (Test ENvironment Setup & Execution) is a command-line tool to easily run tests agains multiple versions of ProcessWire CMF. Are you building a module, or a template and you need to make sure it works in all supported ProcessWire versions? Then Tense is exactly what you need. Write the tests in any testing framework, tell Tense which ProcessWire versions you are interested in and it will do the rest for you. See example or see usage in a real project. How to use? 1. Install it: composer global require uiii/tense 2. Create tense.yml config: tense init 3. Run it: tense run For detailed instructions see Github page: https://github.com/uiii/tense This is made possible thanks to the great wireshell tool by @justb3a, @marcus and others. What do you think about it? Do you find it useful? Do you have some idea? Did you find some bug? Tell me you opinion. Write it here or in the issue tracker.1 point
-
In the modules config screen you can set it under "sender_reply". Also a "sender_errors_to" is available. If you need to set it dynamically, you must go the workaround with modifying module config-settings via API. If so, you will find examples here in this thread or the forums in general. you can use this: $data = wire('modules')->getModuleConfigData("WireMailSmtp"); // or, regarding on scope, $data = $modules->getModuleConfigData("WireMailSmtp"); than modify the reply adress: $data["sender_reply"] = "you@example.com"; after modifying, you can write it back: wire('modules')->saveModuleConfigData("WireMailSmtp", $data); // or $modules->saveModuleConfigData("WireMailSmtp", $data);1 point
-
Thank you, @abdus, your solution worked. So it buys me some time to figure out what happened with my initial setup.1 point
-
Still no idea, try to load BatchChildEditor.js and check "addBceColumnControls" function at line 213. I guess you've tried disabling AOS to ensure it's not interfering.1 point
-
I can't see issues here. Perhaps you could find the corresponding JS code in BCE and see where it fails. You could also check if the markup is there so it's not only a CSS issue (with devtools).1 point
-
I have uploaded a picture of this behaviour in the previous post. The batch child editor will be shown in addition to the default children list (tree) of PW under the children tab. At the top there is the batch child table and below is the PW child table. I have choosen the "replace" mode which should replace the default PW list with the batch child list. No there are no errors in the Tracy bar.1 point
-
1 point
-
1 point
-
1 point
-
Sorry for not being clearer. What I was trying to say was that if, say, you imported a news feed from an outside source at a specific time, or it was updated and new items added all at once, and all of a sudden you had several images being resized for use on the front page, then that might make for a bottleneck. Whatever is causing the issue, let's try to dig a bit deeper. Would I be right in thinking that you are on the Legacy branch (2.8.n) of PW? That's the one where line 390 of /wire/core/WireDatabasePDO.php looks likeliest to trigger an error. It shouldn't make a difference, but you never know. Do you have (or could you ask for) access to the mySQL slow query log? It might not help, but it's another thing to eliminate, especially now that we are looking to resolve a mySQL timeout error that the logs you've posted point to. Depending on your hosting setup, it might not even be your site that is the root of the problem - someone else might be borking the db server for you and you see the symptoms!1 point
-
1 point
-
Hi @Naz Possibly it's done via hooks or with a custom module. Try to look in these files site/init.php site/ready.php site/finished.php1 point
-
Not a definitive solution, but you can use strftime for locale-specific dates. From its documentation then you'd do something like this. <?php function formatDate($format, $timestamp) { // set first possible locale from the list setlocale(LC_TIME, ['no_NO', 'no_NN', 'no_NB']); return strftime($format, $timestamp); } One thing to note is that you need to use strftime specific date format.1 point
-
Eventually got it sorted - eek! Aside from finishing deleting, I have now stopped the media side constantly indexing and cleared out thousands of files associated with creating thumbnails for the cloud side which I don't use. (Note, I have had this drive for ages so it is already long past warranty). Everything much faster now. Really this is a lesson in complexity. If you try to be connected to everything all the time as we are pushing to be in our world, eventually it gets so complex that is collapses around you. Chalk and slate had something going for it1 point
-
// Page > Page > Page > PageArray > children() // There's no PageArray::children() method $result = $page->parent()->parent()->children('template=event-tickets')->children(); // Use this: $result = $page->parent()->parent()->child('template=event-tickets')->children(); // Or even $event = $page->closest('template=event'); $tickets = $pages->find('has_parent=$event, parent.template=event-tickets');1 point
-
@ryan - another thought - could the API reference docs on the website link to the appropriate lines in the code on Github? Obviously the link would have to be to the exact commit that was used to generate the docs, but I don't expect that should be hard to implement. Also, even though I don't have the API Explorer module, I would still like to suggest implementing an editor protocol handler link so that users could click to open to the appropriate link in the code in their favorite code editor. I do this with the Captain Hook panel in Tracy and find it fantastic.1 point
-
@Peejay Of course, it doesn't matter where you place the folder as long as the user running apache has write permission. So for testing purposes, you could also place the folder inside the document root. Cheers1 point
-
There was an undocumented "list" filter among the filters that is now "officially" published. It was similar to the built-in implode filter but didn't choke if you passed a string instead of an array to it. I suggested this improvement in the Nette forums but they weren't too enthusiastic. In PW there are times (at least I had) when you don't know for sure if a data is a string or an array so I added this check to avoid errors. The filter removes empty values so no need to check data existence manually. You can specify a separator string and/or a HTML tag, so it's easy to build eg. an unordered list. Just apply it to an array of possible items and the filter will take care of the rest. Here is an example.1 point
-
I am glad that this project is helping ProcessWire getting more devs on board :). I just want to say that I wouldn't have been able to finish ProcessVue if it wasn't for the amazing ProcessWire community. I believe that the community truly is the biggest selling point for new users (like me). Before trying ProcessWire I used OctoberCMS for a while but when I was stuck I got 0 support from the forums, so...althought the CMS is based on the amazing Laravel framework, I just left! I think that ProcessWire is extremely powerful and flexible and with time will become the tool of choice for frontend developers, the new GraphQL module will also help on this direction. Droves of frontend developers are looking for a CMS like this, they just don't know it exists! The usual keywords they use when looking for a SPAs CMS is "Decoupled CMS" or "Headless CMS", and I believe that that's exactly what ProcessWire is for! Some frontend developers prefer to use NodeJS, but the learning curve is huge if you need it for a non trivial project, and the worst thing of all is that after two weeks ANY js tool you may have used is outdated. See for example how Angular has been replaced with React or Vue, and Gulp with Webpack. That doesn't mean that I am against improvements in this regard, I just feel that it's just too much for us poor frontend devs to cope with! ProcessWire is stable, easy to use and won't change API every week. BTW, after that I migrate ProcessVue to GraphQL I am also planning to add Auth0 login integration with JWT, as I think that login/signup is a common feature in SPAs. I am sure I'll have to annoy @Nurguly Ashyrov and the rest of ProcessWire community for getting it in sync with ProcessWire users, but the result should be quite useful1 point
-
@chrizz - I am not really sure why this works - not much time to test right now, but it does. $this->addHookBefore('WireMail::send', null, function($event) { $event->object->toName = 'testrecipient@gmail.com'; }); I would have thought it would be: $event->object->to, but doing that just adds another address. This seems to overwrite the existing one. Keep in mind I am not sure if this works with multiple recipients, but hopefully a decent start to get you going. Please let us know what you find. PS - I put this in site/ready.php1 point
-
Hi UIkit 3 users In v2 there used to be a file called uikit-variables (actually two files, a less and a sass version). I liked it this way, because I could simply use my text editor's find all feature to look for what I was interested in. In v3 all the variables are declared in separate files found in the components directory. So I hacked together a simple bash script to collect all the variables in a single file, just for reference purposes, so that I can still do my search in one file only. Should anyone want to do the same, please feel free to use it: #!/bin/bash # Author: Szabesz, release date: 2017-01-12 # Use at your own risk! # Purpose: This script collects all the variables used by UIKit 3 # Configuration: adjust the variables called SOURCE_DIR, TARGET_DIR and FILE_NAME # Usage: run the script and find the result in the generated output file: $TARGET_DIR/$FILE_NAME # How it works: it finds all the 'less' files we need in the folder called 'components' (specified by $SOURCE_DIR) # then grep filters all the lines beginning with @ # in each line, the first occurrence of ':' is replaced with ': ' by sed, so that we have some extra space # finally lines are outputted into a file # Known issues: tested only on macOS 10.11 and Bash 4.x # @media queries are also included, but I consider this to be an added bonus :P # Credits: https://getuikit.com/ set -e; printf "Collecting all variables used by UIKit 3...\n" SOURCE_DIR="/path/to/uikit/src/less/components" TARGET_DIR="/path/to/target/folder" FILE_NAME=_UIkitVars_$(date "+%Y-%m-%d_all.txt") cd $SOURCE_DIR if [ -f $TARGET_DIR/$FILE_NAME ]; then rm $TARGET_DIR/$FILE_NAME fi find . -type f \( -iname "*.less" ! -iname "_import*" \) | xargs grep -E "^@" | sed 's/:/: /' >> $TARGET_DIR/$FILE_NAME printf "End of script has been reached :)\n" exit 01 point
-
my favourite: http://appvswebsite.com/ is your budget < 10.000$ ? ---> build a website1 point