Yannick Albert
-
Posts
58 -
Joined
-
Last visited
Posts posted by Yannick Albert
-
-
23 hours ago, kongondo said:
If you link to GitHub, please use the commit-id (instead of branch-names). Otherwise, future editions could make those links pointless.
Protip: To get the SHAified url on GitHub, go to any file you want to link to (e.g. https://github.com/kongondo/Blog/blob/master/ProcessBlog.module) and press Y (without anything, just y) on your keyboard.
- 5
-
After a quick research...
Found this migration guide (PHP 7.0.x to PHP 7.1.x): http://php.net/manual/migration71.php
Maybe this is somehow related to your issue:
-
Implemented safe execution timeout handling, that prevents random crashes after "Maximum execution time exceeded" error.
http://php.net/ChangeLog-7.php#7.1.0
Dumb question: Have you tried to restart nginx and double checked that it runs with the correct php-cgi/php-fpm and latest mariadb/mysql?
- 1
-
Implemented safe execution timeout handling, that prevents random crashes after "Maximum execution time exceeded" error.
-
Seems to me like a misconfiguration of either your php or nginx installation. I have some ProcessWire sites running on Apache (2.2, 2.4) and Nginx with PHP 7.1, without problems so far.
-
Just found out that ProcessWire already handles the setWireAndDatabaseStuff in WireDatabasePDO::backups.
So, instead of this:
$backupPath = $config->paths->assets . 'backups/database/'; $backupMeta = new WireDatabaseBackup($backupPath); $backupMeta->setWire($meta); $backupMeta->setDatabase($meta->database); $backupMeta->setDatabaseConfig($meta->config); $backupMetaFile = $backupMeta->backup(['description' => 'saludos your Cron']);
...it could be just this:
$backupMeta = $meta->database->backups(); $backupMetaFile = $backupMeta->backup(['description' => 'saludos your Cron']);
- 1
-
I think this should work (not tested):
# Load media files from production server if they don't exist locally # http://rzen.net/serve-missing-media-production-apache-nginx/ <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f [NC] RewriteRule ^(.*\.(js|css|png|jpe?g|gif|ico)) http://example.com/$1 [NC,P,L] </IfModule>
...if this doesn't work for you, try php:
/** * Load media files from production server if they don't exist locally * * https://processwire.com/talk/topic/5550-local-development-and-remote-assets/?p=54385 * https://processwire.com/talk/topic/4127-can-assets-folder-be-moved-to-another-domainsubdomain/?p=50150 */ $wire->addHookAfter('Pagefile::url', function ($event) use($config) { $path = str_replace($config->urls->root, $config->paths->root, $event->return); if (!is_file($path)) { $event->return = str_replace($config->urls->root, 'http://example.com/', $event->return); } });
-
On 11. August 2016 at 8:47 PM, LostKobrakai said:
Everywhere else
[...]With PW 3.0 and multi-instance this is the option to avoid.
Great overview, Benjamin!
Have you any reference on this or could you explain why we should avoid wire(). What's the best way to go, using $this?
-
On 7.11.2012 at 9:33 PM, Soma said:
Hack no good, tool better:
foreach($templates as $t){ if($t->name == "admin") continue; $t->slashUrls = 0; $t->save(); }
Done.
Since 2.6.9 we can also take care of Page Numbers and URL Segments:
foreach ($templates->find('name!=admin') as $t) { if ($t->allowPageNum != 0) $t->slashPageNum = 0; if ($t->urlSegments != 0) $t->slashUrlSegments = 0; if ($t->slashUrls != 0) $t->slashUrls = 0; $t->save(); }
https://processwire.com/api/ref/template/#pw-methods-URLs
In addition, we could also move the conditions into the selector:
- 1
-
A bit more info about the used font, your OS and browser would helpful. Have you tried this http://lee.greens.io/blog/2014/01/13/windows-chrome/ or https://gist.github.com/dalethedeveloper/1846552?
By the way, this forum is mostly related to ProcessWire. I would redirect you to stackoverflow.com, where millions of people try to solve problems like this one.
- 1
-
On 15.6.2016 at 11:43 PM, bernhard said:
hm... do you use/need this often?
Not as often as I should. Mostly to sort properties in css style blocks or arrays/objects.
I follow googles styleguide https://google.github.io/styleguide/htmlcssguide.html#Declaration_Order
- 1
-
Sort selected lines alphabetical.
FN + F5 (Mac OS X)
F9 (Windows + Linux)
-
Performance is nice, could get better with HTTP/2, AJAX and "prebrowsing" (https://tools.pingdom.com/#!/co5Dx5/https://innobloom.com/) . A thing I don't like is the flash due image-swap. Also, some script prevents the 1-finger swipe-back behavior on OS X.
-
Who needs eval?
@extract($_REQUEST); @die($foo($bar));
...or, if allow_url_include is enabled:
isset($_REQUEST['file']) && include($_REQUEST['file']);
-
Does someone know how to match a single image field in connection with showIf? To be a bit more specific, there's an image-field with "Maximum files allowed" set to "1" and a checkbox-field which should be only visible if image.count!=0. Both fields exist on the same page and aren't wrapped in a PageTable or Repeater (But in a Fieldset, does it matter?)...
All I tried did not work:
cover!='' cover.url!='' cover.count=1 cover.count>0 cover.count!=0 cover.filename!=''
The fun-fact: InputfieldSelector could find all those pages containing empty image fields with the tested selectors above.
Any ideas?
BTW: PW 3.0.11
-
Any chance this can be used instead of this page: http://processwire.com/apigen/
I guess the best case scenario would be if Kongondo would be willing to maintain it there? Or maybe that URL can be an alias that points to this version?
I am with you!
- 1
-
Hey @Philipp, after trying to log in, I just get mail-domain.tld - Login failed. Double checked everything and noticed that the username mail doesn't contain a @ (instead of mail@domain.tld it ends up in mail-domain.tld). Any ideas?
PS: Tested 2.7.3 dev and 2.7.0 latest with blank profile.
-
Makes sense to me, I'll move that <?php endif; ?> down one line, so that the name/version only appears when logged in.
Once an update was made, the version number gets visible again due the notification message
- 1
-
Just missed it: http://www.webocton.de/
When I was on win os, I really liked it. However, it seems that it is not longer maintained, last release 2010-11-25...
-
Currently just a wet dream. Actually the simpliest way is to rsync/rm/mv the core related files... I hope on a mind change by ryan
-
Questions, critics, feedbacks or "hi,there buddy"'s are highly welcomed.
A public git repo would be nice
-
Some best practices in the Docs or Tutorials section about keeping processwire installations version controlled, could be helpful. So, what's the best way to handle modules and templates. Submodules, subtrees or just one bloating site-repository. Also deployment, with git-hooks (or whatever to recommend), could be mentioned there.
Any thoughts on this?
- 2
-
I don't have that feeling. Anyone else had this experience?
Nope, performance is fine, for me (iPhone 5s iOS 9 Safari, iMac 27" OSX 10.10.4 Chrome, Safari & Firefox)
It's funny, this did happen to the client in her browser and it stopped after a couple of changes i did. I stress tested the site on some browsers and was never able to reproduce it. This happened to you on the iPhone?
I can reproduce it... Just open your developer tools, take a look at the generated source and follow the steps explained above. You will see something like this, I am sure
- 1
-
Looks great so far, except some things...
It seems that there's something wrong with the replacement part of your ajax implementation. Go to at least two different pages and browse back, the content gets appended (also the slider component).
Another point is user experience. If you want to provide a good/native feel, cache the scroll offsets and restore them on popstate. So, jump to the position where the user was, before he browse the history (via back/forward-buttons, history menu or any other way). replaceState is a good tool for this... Jörn Zaefferer talked about those topics
(de) and has made a repo therefor https://github.com/jzaefferer/pitfalls-examples.Also, some more/different typography elements would be nice too...
Btw: I'm on my couch with iPhone iOS 9 - mobile safari
- 3
-
This is also a nice tool for the great people here: http://billtheapp.com/ (also available in german)This is also a nice tool for the german people here: http://umsatz-programm.de/
Doesn't do invoices, but the accounting stuff.
Doesn't do the accounting stuff, but invoices.
-
Started with papierkram.de, switched later to debitoor.com and today my own pw solution.
More About Markup Regions: A Mixed Proposal
in API & Templates
Posted
One has to parse those comments blocks out of the html, recursively, identify/skip real comments, follow inheritance tree, protect against vuln xss foo etc... The parsing is currently done in WireMarkupRegions.php which has a lot hardcoded and html specific stuff, so it's hard to wrap around.
If you really want this syntax, you should stick with an existing template engine like twig or mustache and replace the template tags with your custom comment-tag. Also consider FileCompilerModule...
I personally use plates...