Leaderboard
Popular Content
Showing content with the highest reputation on 05/26/2017 in all areas
-
Client-side image resizing has been on our roadmap for awhile, and this week we've got it ready on the dev branch in version 3.0.63. People expressed interest in this feature in the comments to last week's post, and I promised to give it a closer look sooner rather than later. After getting that closer look, and doing some research, I realized we could get in this week's version. After using it now for a couple of days this week, I think people are really going to like this feature, and it works a lot better than I had originally guessed it could. https://processwire.com/blog/posts/processwire-3.0.63-adds-client-side-image-resizing/13 points
-
@ryan, I want to let you know I really admire the way you get things done! Every time you solve a problem it is an example of a perfect engineer solution. Spot a chance to create a feature everybody wants but few have, examine existing solutions present, learn from them, build on them, make them work better than before, deliver a working feature within a reasonable time frame, provide comprehensive docs right there in the code for tech people, write a press release for the end users, move on to another task. Way back I once started a topic called "What is "Reiska". I think now I can feel what @apeisa and others at Avoine meant by this title. There is such a word in every language, and all of them fit you and your type of people (of which there is quite a few here in forums, luckily). I sometimes find myself questioning some of your marketing and organizational decisions, but I always applaud to and try to learn those problem solving skills and mindset from you. ProcessWire is unique thing, that inspired my way from "anykey clicking" web development to managing to read and write some relatively complicated code. I try hard to provide my clients with the best engineer solutions they can get based on ProcessWire. Because I can, and because it so exiting to do with PW, and because this is the way real stuff should be done. Thanks for the inspiration.2 points
-
Hi @Chamche, Installing ProcessWire is really straight-forward and easy to do. Ryan has done a tremendous job ensuring that. There just seems to be a minor glitch in the procedure you used to set this up. But we'll help you get this sorted out. The problem now is, You deleted the original .htaccess file, Renamed the htaccess.txt file to .htaccess, Attempted to install ProcessWire and got the same error, Restored the original .htaccess over the renamed (ProcessWire) .htaccess file. Is that correct? In your other thread, you said the server was running php 5.3. Did you have bluehost upgrade to php 7? We are kind of lost here with where you currently are with the server config and ProcessWire installation. So, let's start from the beginning. What apache version is running? What php version is running? What is the ProcessWire version you are installing? Is bluehost running cpanel? (I'm not familiar with it so I have to ask) What is the content of the error.log file? If there are still issues after answering these questions, would you be willing to provide your login credentials (via Private Message) so that we can take a look? Note: You should change your login credentials after the installation is complete so that only you have access to your hosting account. One last thing. It is never a good idea to be configuring a server when you are tired (I know from experience. LOL). Get some rest and come back to this later. We'll be here to help you out.2 points
-
Just because the user is logged in doesn't mean he has view/edit access to the user page. The user template is secured and inherit access from admin template.1 point
-
Solution, tested and given by the web hoster, which works. I've just added it (without RewriteEngine On as it is already present) as one block between # 13. and # 14. RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTPS} off # First rewrite to HTTPS: # Don't put www. here. If it is already there it will be included, if not # the subsequent rule will catch it. RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Now, rewrite any request to the wrong domain to use www. # [NC] is a case-insensitive match RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] The web hoster couldn't understand at one point why it was not working. They were Web4all, now they are Yulpa. Something I've found today that could be (one of) the reason(s):1 point
-
@Chamche show the end of the error log, or just copy paste it to pastebin or similar. LE: also php 5.4 is pretty old too http://php.net/supported-versions.php1 point
-
Years later we have more options) There is a special module by @ryan for that now. You can also do a backup from cli with wireshell. There is a nice module by @flydev still in the way, but looking promising. Look here for some discussion and 3rd party tools.1 point
-
3) when checking for file_exists, always use full path. Does it return false? If not, the file is readable. In the docs it says This function returns FALSE for files inaccessible due to safe mode restrictions. However these files still can be included if they are located in safe_mode_include_dir. So you might want to check for safe_mode. But you are saying other sites on the same server are running fine. So I guess its not safe_mode related 1+2) Did you compare file ownership and permissions with other sites installed on the server, anything unusual? Maybe have a look here to understand how permissions on host europe servers work: https://www.hosteurope.de/faq/webhosting/webpack/dateirechtestruktur/ Other than that I would have no clue either...1 point
-
@Robin S spot on! Thank you very much. This is working. Except for I had to exit the hook for template repeater_repeater. Otherwise I got an error "Call to a member function not() on null" for the "->repeater->not('published=0')" part of your code. The working version now reads wire()->addHookAfter('Pages::saveReady', function($event) { $page = $event->arguments[0]; if($page->template == 'repeater_repeater') return; if($page->isChanged('repeater')) { $old_repeater_value = $this->pages->getById($page->id, array( 'cache' => false, 'getFromCache' => false, 'getOne' => true, ))->repeater->not('published=0'); // exclude as-yet-unpublished items bd($page->repeater->count, 'new count'); bd($old_repeater_value->count, 'old count'); } });1 point
-
I think this is because as soon as you click "Add New" in a repeater inputfield a new as-yet-unpublished page is added to the repeater. So when you get the "old" page after saveReady this unpublished repeater item already exists and is included in count(). Try this: wire()->addHookAfter('Pages::saveReady', function($event) { $page = $event->arguments[0]; if($page->isChanged('repeater')) { $old_repeater_value = $this->pages->getById($page->id, array( 'cache' => false, 'getFromCache' => false, 'getOne' => true, ))->repeater->not('published=0'); // exclude as-yet-unpublished items bd($page->repeater->count, 'new count'); bd($old_repeater_value->count, 'old count'); } });1 point
-
Did you also check the owner:group for the images that are not loaded, e.g. /site/templates/img/square/kinderlieder-ueber-den-fruehling.jpg? I had an issue once with host europe where the owner:group of files were wrong after uploading through FTP. I needed to ask their support to change file ownership to default. In the logs it says: No such file or directory for the images that are problematic. Are you sure that they are there? And in your templates/php/site/SquareImage.php you could do a check like file_exists() before processing the images to avoid a crash in case the image is not there.1 point
-
You probably are using php 5.3 or lower. Change hosts or ask the current one to upgrade.1 point
-
This is a minimalistic website for the german architecture office Weissenrieder Architekten BDA. The front-end uses UIkit 2 and Isotope for the projects overview. Every project category can be accessed in the overview with an URL segment. ProFields Table was used for the project detail view. www.architekt-weissenrieder.de Modules used: AdminThemeUIkit Table ProCache Markup Sitemap XML Email Obfuscation (EMO) Jumplinks Tracy Debugger Regards, Andreas1 point
-
I'm puzzled by the idea that the thumbnail part of the selector could change your sort order - by using thumbnail!='' we are saying that we don't want any pages that don't have a thumbnail (because in that case you can't show their thumbnail in the slide). So that will exclude some pages if there are any without a thumbnail, but it shouldn't change the sort order of the pages that are matched. If you are using my example that uses chunk() then remove this: // ditch the last group if it has less than the number of images per slide (assuming that's what you want) if( count(end($albums_chunked)) < $images_per_slide ) array_pop($albums_chunked); Or if you are using my second example then change the for() line to: for($n = 0; $n < $albums->count(); $n += $images_per_slide) {1 point
-
Basically every time you need to handle files bigger than say 100-200MB, but you don't want to / can't give php more memory. Also timeouts Given more free time I would've created a bit more fleshed out PR to the core, but it's currently not possible. The biggest thing to improve here would be some kind of cleanup, so chunks of unsuccessful uploads do not sit there forever. Keeping them for a short timeframe is nice, because it'll speed up second tries.1 point
-
Yes, you can set the name for children of a page, editing the parent template "Family" settings. See: http://processwire.com/api/modules/process-template/1 point
-
@Christophe I had too many redirects at one time in the past which was due to the same thing you are trying to accomplish. With my registrar, the dns option to redirect using a wildcard, such as *.domain.tld (www.domain.tld) to domain.tld covers the initial redirect. Then you can leave the htaccess file to change http to https. This resolved the issue for me.1 point
-
I've used the code on this tutorial for at least 4 or 5 sites, and it's rather easy to tweak for your needs. (You can pay for the full source code if you want to reward the developer for his work, but you don't have to: you can copy and paste the various parts needed).1 point
-
A quick google search brings up a relatively recent module Facebook Events. Reading through the docs and code should get you started.1 point
-
The CDS Group is an established service partner of leading manufacturers and trading partners in the IT and high-tech sector. We relaunched their service website using the latest ProcessWire. Building this website was fun, especially because of the latest additions to ProcessWire, like the recently introduced markup regions and AdminThemeUIkit. It is really easy to brand the new admin theme with a few lines of code, in my case 7 (see a glimpse in the screenshot below). Besides that, this website makes heavy use of the Repeater Matrix, to be as flexibel as possible. The front-end was build with Bootstrap 3 and the icons used are an custom icon font generated with the IcoMoon App. For a better usability, every textarea can be edited in the front-end. www.cds-service.com Modules used: AdminThemeUIkit Front-End Page Editor Repeater Matrix ProCache Markup Sitemap XML Email Obfuscation (EMO) Database Backups Jumplinks Tracy Debugger Regards, Andreas1 point
-
I download everything to my pc with rsync, I'm on Windows 10 so I use Bash on Ubuntu on Windows, for Windows 7 there's cygwin. ssh root@ip /var/www/clients/client1/web1/web/script.sh && rsync -av -e ssh root@ip:/var/www/clients/client1 /mnt/e/zBackup/www --exclude-from '/mnt/e/zBackup/www/exclude.txt' --delete ssh root@ip /var/www/clients/client1/web1/web/script.sh - runs a script that backups all databases rsync -av -e ssh root@ip:/var/www/clients/client1 /mnt/e/zBackup/www - downloads everything from /var/www/clients/client1 on my vps to E:\zBackup\www on my pc --exclude-from '/mnt/e/zBackup/www/exclude.txt' - text file with paths to exclude from downloading Database backup script1 point
-
I found... Modules: Ryan Cramer: http://modules.processwire.com/modules/process-database-backups/ kixe: http://modules.processwire.com/modules/cronjob-database-backup/ Discussions: flydev: rot:1 point