-
Posts
6,648 -
Joined
-
Last visited
-
Days Won
365
Everything posted by bernhard
-
that feature is quite hidden - i think that could be designed better from the ui side. i've also found it only by coincidence: https://processwire.com/talk/topic/7819-module-alternativegridfiles/?p=75845 sometimes it is also really nice to use your dev tools console for such things: $('.fa-trash').click();
-
hi! ok i'm now also having problems with file uploads between 500 - 1000MB on plesk. first problem was an error after some time due to MaxRequestLen on php FCGI that seemed to fix it: https://www.opensource-excellence.com/blog/item/430-cant-upload-files-due-to-fcgi-maxrequestlen-restriction-in-plesk.html now the upload proceeds until 100% but throws this error in the console: InputfieldFile.min.js?v=124-1463995380:1 POST https://.../admin/page/edit/?id=xxx&InputfieldFileAjax=1 net::ERR_EMPTY_RESPONSEn @ InputfieldFile.min.js?v=124-1463995380:1w @ InputfieldFile.min.js?v=124-1463995380:1(anonymous function) @ InputfieldFile.min.js?v=124-1463995380:1 The file is around 700MB. After upload i have a 502MB file in the folder. When i save the page with the stuck 100% upload this file is removed completely (thats the part where i know why ^^ ) Any help for this? I have no errors in the apache error log for the second problem. The first Problem showed this (for reference and search engine): [Tue May 31 15:34:02 2016] [warn] [client xxx] mod_fcgid: HTTP request length 134225920 (so far) exceeds MaxRequestLen (134217728), referer: https://xxx/admin/page/edit/?id=xxx
-
$page->created in hookevent? very strange...
bernhard replied to bernhard's topic in General Support
thanks lostkobrakai, that seems to be the case! -
thank you robert. the demo does not work for me as expected. when i click on "blog" and then on "work" it fires the click and not the dropdown... looks nice, thank you you can try my menu on https://new.mentalestaerke.at/ as long as the page is there. would be nice to hear if it works for you or you have any problems. (you need the desktop version of the menu)
-
i find it really intuitive. it looks a bit clumsy on my screencast because of the mouse but it feels different when you are touching and not pointing. i'll send you the link so you can try yourself
-
hi, i had a really strange bug today! szenario: user can book an event user gets invoice via mail admin can create new invoices the problem: $page->created was empty on mail-invoices whereas it was properly filled on admin-creation difference between those two events from the code-perspective: nothing both are triggered via $page->createInvoice(); public function renderAddressSection($event) { $page = $event->object; $eventpage = $page->getEventPage(); if($page->template != "booking") return; // shows 0 $page->created; // shows 1462893271 wire('pages')->get($page->id)->created; any ideas what could cause this odd behaviour?? all other fields work well. of course in both cases the booking is already saved. that was my first guess, but in both cases there was a proper id for the page... a quick test if "created" was not available in hooks in general showed, that it SHOULD work as i expected: $this->addHookProperty('Page::test', $this, 'test'); public function test($event) { $page = $event->object; $event->return = $page->created; } $page = $pages->get(3505); $page->of(false); echo $page->created . ' ' . $page->test; // shows 1462893271 1462893271 thank you for your help!
-
i'm currently porting a clients website from joomla to processwire (finally, it's a good week ) and we are using the old design for that. today i recognized that on tablets the menu doesn't work as expected, since the menu structure changed from joomla-chaos to pw-awesomeness the problem is the old multilevel problem when you have items and subitems and want to show the subitems on hover. on touch devices your clients will perform a "click" anstead of a "hover" and they will trigger a new pageload. i came up with a quick fix and would be interested in your opinions. seems to work really nice here: $(document).ready(function () { var menu = $('...'); menu.find('a').click(function(e) { console.log('clicked'); // early return if the parent has no hover-class if(!$('...').hasClass('...')) return; // prevent click when delay is too small var delay = Date.now() - $(this).data('hovered'); if(delay < 100) e.preventDefault(); }); menu.find('a').mouseover(function(e) { var time = Date.now(); $(this).data('hovered', time); }); });
-
update: i'm using laragon now and love it! see this post: !!! OUTDATED !!! i'm using vagrant on win10 for all my development too. i really like it once you have the hassle of setup done. i'm now using scotchbox - i don't use the repo gebeer linked to. here is my new one: https://gitlab.com/baumrock/vagrant-pw-lamp/tree/master sorry, no time for documentation right now, but the readme from the old repo should also have some useful informations (as already linked by gebeer): https://github.com/BernhardBaumrock/vagrant-pw-lamp on win8 i had to switch GUI mode to OFF otherwise it didn't work. on win10 it was the contrary ^^ i'm too busy right know to give more help. gebeer and i have been talking about vagrant and pw development quite for some time now but it all seems too experimental to really recommend our setups to someone else... but if you want to try and have some specific questions please let me know some nice things i like and why i am using it: have a linux sandbox setup projects with "real" hosts in seconds; my workflow is like this: create a folder on my host like "example" "git bash here" clone my repo https://gitlab.com/baumrock/vagrant-pw-lamp vagrant up then i have my machine ready and can access my linux server on example.dev mailcatcher will catch all emails, so i can also test all email stuff, even when i'm offline i can do "grabpw" and get a fresh install of PW to choose from master/dev/devns i can do "backup" at any time, that will backup files + db i can do "restore", so i can move projects from one device to another i can even do "push" or "pull" of the whole website from my live server to my vagrant box, but that's a bit experimental when i'm done with the project i do "vagrant destroy", it will backup everything and keep only 1 backup and destroy the machine. so i don't mess up my host system with lots of GB of VMs ps: sorry i just realized that my repo is private... i can't make it public atm but you can pm me if you are interested
- 28 replies
-
- 6
-
-
- vagrant
- virtualbox
-
(and 1 more)
Tagged with:
-
yesterday i found out a very nice feature of sublime called "code folding". maybe it's not new for some of you, but it was for me and makes working a lot more comfortable. you can fold your code depending on levels: CTRL + K, then CTRL + 2 will fold on level 2: when you have your cursor inside a method, it will stay expanded. you can then fold your method on level 3: CTRL + K, then CTRL + 3: that's really nice. you can also find it in the menu under edit > code folding another great feature of sublime is multicursor. i guess most of sublime users know that... so i thought i start a new topic where we can share nice tipps and tricks for sublime and the work with processwire do you have any? ps: https://processwire.com/talk/topic/4203-sublime-text-2-snippets-for-processwire/ https://processwire.com/talk/topic/1888-sublime-text-2-course/
-
thank you robin, yes, they do have a template file, because its the same template i use on lots of other pages that have to be viewable on frontend. i fixed it quickly by putting this in my _main.php file: <?php if($page->closest('/tools')->id) throw new Wire404Exception(); pw is so awesome but i would prefer to understand whats going on and why viewable is called for every tab in the page editor ps: 700 posts... i'm getting old
-
hi, i have some settings under a page called /tools (for example /tools/default-mail-data-for-events or the like). i want all pages under this parent be hidden on the frontend so i came up with this: $this->addHookAfter('Page::viewable', $this, 'hideToolPagesFromFrontend'); /** * hide all pages under /tools from frontend access **/ public function hideToolPagesFromFrontend($event) { $page = $event->object; bd($page->closest('/tools')->path); if($page->closest('/tools')->id) $event->return = false; } the tabs should look like this: the tabs look usually like this: but when the hook is active all tabs except "content" are hidden: the dump is like this: why is page viewable called on every tab? how can i just hide the "view" tab? on frontend the functionality is as supposed...
-
Blog: Web hosting changes and upgrades for processwire.com
bernhard replied to ryan's topic in News & Announcements
Thank you for the insight and thank you for your work (both ryan and jan). Also a noticable boost here in austria the automatic failover is very interesting, though i'm curious what you do, when people post eg forum posts on the failover system while you are doing upgrades on the master system. or are you synching changes back somehow or are you just talking about file changes and synch back the whole database? -
$config->urls->templates with absolute URL?
bernhard replied to Jonathan Lahijani's topic in API & Templates
yep, was also the best solution i found: <a href="//' . $config->httpHost . $booking->editUrl . '" target="_blank"> -
don't know how your module is organized (deadline coming), but throwing in an idea: maybe we could have a "custom" folder, where we can put in our own code snippets and your module will make them visible for toggling on/off. for example: /custom/makeButtonsBigger.js would result in some custom code that makes admin buttons bigger and a checkbox in your module. that way we could build our own repository of admin tweaks, put them on github or the like and on every new pw-install we would just have to do a git clone and tick some checkboxes. what do you think? this is quite similar to admincustomfiles but i never found it really easy to use so i don't really use it a lot. maybe we could have some kind of syntax in thos files to restrict it to a selector and show some better descriptions in your module/panel /* custom admin tweak example * * #summary * this is a great summary * with lots of content * * #pageselector * id>10 * * #editedpageselector * template=example */ $(document).ready(...); #editedpageselector would refer to the currently edited page in processpageedit, whereas #pageselector would refer to the current admin page any thoughts on this?
-
in this case i would prefer them to be rendered beside in one row (inline)
-
what i've also came across several times is when on mobile and you have a pagetable and you want to scroll down, if you tap on a pagetable item it will trigger the pagetable sort. it would be great to disable table sorting on mobile. or show just a sort symbol and allow sorting only on this icon.
-
very cool tpr! feature request: an option to show the save options instantly on button hover. i find it really annoying to have to click on this little chevron to show the popup and then have to click again on the right option. i'm still missing the very quick "save+new" and "save+close" from joomla offtopic: also thanks for the hint to netteforms - my project needs more time than i thought but it is getting more and more awesome
-
ah, you are right - that was my mistake! still new to all this OOP and namespacing but i'm making progress
-
hi soma, as this is a very popular post i think it should be mentioned, that there's a best practise for adding pages stated by ryan here: https://processwire.com/blog/posts/processwire-2.6.21-upgrades-comments-more-on-pw-3.x/#more-updates-on-processwire-3.0 $page = $this->wire(new Page()); maybe you can update your post? could save lots of troubles when using multiple instances of pw3 and i think all of us should take care of such things as soon as possible as they are working also in earlier versions
-
Hi Robin, thanks for the module! just installed it without problems on 2.7.3 2 suggestions: 1) you are using wire(...) some times. for pw 3 i think it would be better using $this->wire(...); see here: https://processwire.com/blog/posts/processwire-2.6.21-upgrades-comments-more-on-pw-3.x/#more-updates-on-processwire-3.0 2) why does one have to add the field manually? i think the field could be added to every template automatically. it would even be better to not see the field in the template editor. don't know how or where you would save the value then... maybe that's the reason for your approach? PS: any ideas why my field looks like this?
-
i dont need any because i'm rendering it for a PDF; but would be a valid point i don't understand your question. what do you mean? thanks for the hint and link
-
i'm sure this is nothing fancy for all the pros here, but at least i did that a lot more inconvenient for a long time and maybe it will help someone else... $lines = array(); $lines[] = $page->company; $lines[] = $page->forename . ' ' . $page->surname; $lines[] = $page->address; $lines[] = $page->zip . ' ' . $page->city; $lines[] = $page->country; echo implode("<br>", array_filter($lines)); // or like this $lines = array( $page->company, implode(" ", array_filter(array( $page->prefix, $page->forename, $page->surname, $page->suffix ))), $page->address, $page->zip . ' ' . $page->city, $page->country ); echo implode("<br>", array_filter($lines)); it will skip all empty lines automatically (for example if there is no "company" or no country) and it's a whole more readable then with lots of IFS and ECHOS
-
i started a new post in the wishlist section regarding this topic: https://processwire.com/talk/topic/13374-allowed-templates-on-a-page-basis/
-
there's already this moduly by bitpoet for allowed parent pages: https://processwire.com/talk/topic/12793-template-parents/ i think it would be awesome to be able to select the allowed children on a per page basis. for example one could create a page "tools" on the tree. that page could be of template "item", like many other pages (just a title field). now it would be great to have the possibility to configure the allowed child templates somehow. - tools (item) - tools A (item) - foo X (foo) - foo Y (foo) - foo Z (foo) - tools B (item) - bar 1 (bar) - bar 2 (bar) - bar 3 (bar) at the moment this would need a template setup like this: - tools (items) -> allowing foos and bars - tools A (foos) - foo X (foo) - foo Y (foo) - foo Z (foo) - tools B (bars) - bar 1 (bar) - bar 2 (bar) - bar 3 (bar) i would be interested to hear your thoughts on this
- 1 reply
-
- 3
-
-
i'm using a sandbox-page for some api testing in my root-folder with bootstrapped api. the file only contains: <?php include('index.php'); // quick way to test api i'm using 1.5.7 on pw 2.7.3