-
Posts
1,473 -
Joined
-
Last visited
-
Days Won
16
Everything posted by Ivan Gretsky
-
And it is certainly worth exploring not only from developer point of view. Decent argument is so rare nowadays. Thanks for the share, diogo.
-
I try to run ProcessPageEdit in a executeEdit method of another ProcessModule like this: public function ___executeEdit() { $out = $this->modules->get("ProcessPageEdit")->execute(); return $out; } It does work for almost everything, but not for a few selects, those option lists are formed with "Custom selector to find selectable pages" option + "Show this field only if". Those fielda appear blank and the dropdown is formed with root children pages. I think I could simply add a ProcessPageEdit as a child to my process page as a workaround, but it is still a bug...
- 1 reply
-
- 1
-
I do not think that there is (or is needed) an IDE specifically for PW. But there are ways to make some IDEs work better with PW (autocomplete and so). Try reading through these threads: 1) https://processwire.com/talk/topic/3336-pre-release-templatestubs-ide-support-for-page-objects/ 2) https://processwire.com/talk/topic/10747-phpstorm-autocompletion-and-typehinting-of-wirexx/ 3) https://processwire.com/talk/topic/2770-recommend-a-code-editor-with-ftp-for-working-on-template-files/ 4) https://processwire.com/talk/topic/3518-what-ide-do-you-utilize/ 5) https://processwire.com/talk/topic/7427-pw-api-as-autocomplete-in-your-ide/ 6) https://processwire.com/talk/topic/1498-better-phpdoc-comments-in-pw-classes/
-
is Key-binding for STRG-S in Admin-Editpage possible?
Ivan Gretsky replied to Pauline's topic in Getting Started
Damn, I like germans! CTRL is STRG on German keyboards, but still CTRL on Russian ones. Got some national pride! But if we didn't lose that cold war it could look like this... -
Filtering results by a field within a ProFields Table
Ivan Gretsky replied to Reid Bramblett's topic in Getting Started
Maybe like this: $place=$page->place; $links = $pages->get("template=links, categories=$pcat"); echo "<h4>$links->title</h4> <ul>"; $filteredLinks = $links->urls->find('place=$place'); foreach ($filteredLinks as $u) { if ($u->desc) echo "<li><a href='$u->poiurl'>$u->urltext</a> ($u->desc)</li>"; else echo "<li><a href='$u->poiurl'>$u->urltext</a></li>"; } echo "</ul>"; -
is Key-binding for STRG-S in Admin-Editpage possible?
Ivan Gretsky replied to Pauline's topic in Getting Started
Check this out. Is that what you looking for? What is STRG by the way? -
Good day! Sometimes I find folders with names starting with a dot in the modules directory. For example: .ProcessCustomUploadNames .ProcessPageListerPro I believe they appear after upgrading with ProcessWireUpgrade module. Could you please confirm my suggestion. What is the use of those folders? Are they there for backup purpose? Is it safe to delete those folders?
-
Is there a way to define dynamic role on runtime based on user role? I have a number of similar roles named similarly (and they will be adding) for each of which I need to make a few dynamic roles. So I am looking for a way to make it DRY. Edit: I mean something like making a hook that generates a dynamic role via API.
-
Thanks. Your module does redirect the user where it is needed. Bit I still have the "Pages" menu visible. How can I get rid of it?
-
Exceeds max allowed file size error on live server
Ivan Gretsky replied to Ivan Gretsky's topic in General Support
1) I found the problem and the solution. Processwire cannot read post_max_size if it is defined in bytes (see here). It sets it to 5M in that case instead. Define your php_ini variables as 100g, 50m, 1200k, but not as 104857600. 2) And I have not been able to redefine the value due to little typo: it had to be $f->maxFilesize instead of $f->maxFileSize. -
Good day! I need to make custom admin interface for specific user role. I want them to only see those menus and menu items I selected. I do not want them to see "Pages". I plan to use custom Process modules under custom admin menu. But I do want to use PageEdit admin interface for editing pages. To make it possible, I have to set edit permission to the pages they are to edit. But that uncovers "Pages" menu for them. How can I achieve that, still using defaul or Reno admin theme? Or is it preferable to make my own?
-
If you are talking about moving content from one PW installation to another, you have several options, which are related: 1) Master Adrian's Migrator module. 2) Exporting and importing templates/fields with built-in functionality. 3) Creating a site profile. 4) DB backup + moving file data manually. But you should really just fix your errors, not run from them .
-
You can probably workaround by using subsequent selectors like this: $p1 = $pages->find('template=accommodationtype,availability.column=1194'); $p2 = $p1->find('availability.row=1889'); $p3 = $p2->find('availability.value=1'); A few more db queries... But if you are right it seems like an unwanted behaviour. I recommend making a github issue or even a PR.
-
Exceeds max allowed file size error on live server
Ivan Gretsky replied to Ivan Gretsky's topic in General Support
Sorry, Mr. Stevens, but i did not get it) What should I do? It seems like both eck upload_max_filesize and post_max_size are set to maximum values... Should I force one to be less than another? -
Exceeds max allowed file size error on live server
Ivan Gretsky replied to Ivan Gretsky's topic in General Support
Thank you, Horst! I did check upload_max_filesize and post_max_size. The are both equal to 1047527424. It is a custom module. I create InputfieldFile like this: $form = $this->wire( 'modules' )->get('InputfieldForm'); $f = $this->modules->get( 'InputfieldFile' ); $f->name = 'upload_file'; $f->label = $this->_( 'Upload File' ); $f->extensions = 'csv jpg db zip'; $f->maxFiles = 2; $f->maxFileSize = 0; $f->unzip = 0; $f->overwrite = false; $f->destinationPath = $path . '.....'; $form->add( $f ); When I echo $f->maxFileSize on localhost it is 104857600, but 5242880 (5MB) on live. Both numbers won't change no matter what i put after $f->maxFileSize =. Though I can easily change the maxFiles variable. It did work a while ago... What could happen? -
I got a process module with a file upload field, which used to work fine, but recently started to give me this massage "SomeFile.zip - Exceeds max allowed file size". On the localhost everything works. I did upgrade PW not so long ago. But it seems like it is a server problem. But what is it? What to check? Please help.
-
Released: PadLoper (commercial eCommerce platform for ProcessWire)
Ivan Gretsky replied to apeisa's topic in Modules/Plugins
Congratulations Antti and all the PW community! This is the first 3rd party script for PW I did buy. I like free open source better , but the presence of commercial activity around the product is surely the sign of it being successful. I think we all should benefit from products like Padloper being developed and made available to us. So maybe it is time to think about re-building modules directory, making it a full blown marketplace? -
Soma's module can do it right out of the box - see instructions here. And it is not hard to do it yourself with a has_parent selector (look here). Be more specific and we can help you better .
-
I actually do not know much about your need. I do not know wheather you are using ajax, how much differ the forms on different pages and so on... But for simple cases the best practice seems to be to submit a form to the same page. It is Option 3 in this Ryan's post. Check out this example. Another usefull resourse on the topic is this Soma's post. There are even a few modules to help - this is one free one, seems like Mike Rockett is working on another one. And of course don't forget that you can (and should) buy this one from Ryan.
-
...or create a template "engine", so engine.php will be your template file.
-
Is there a way to list all hooks attached to an event?
-
Page field does not save on $page->save()
Ivan Gretsky replied to Ivan Gretsky's topic in General Support
Sorry, it is I who is half asleep. I was trying to make my example abstract. I will change the code in my initial post. The problem is not in the typo. -
Good day! I am exhausted trying to get it working on my own so begging for help) I made a frontend form to edit a page. When the form is submitted, I get all the values for the fields from the input, get the required page in $_page variable and assign inputs to the fields. After that I perform $_page->save(). All simple fields get saved as they should. Dealing with page fields I remove all the pages in the array and add the new ones from the input like this: $_page->pagearray->removeAll(); foreach ($input->post->pagearray as $item) { $_page->pagearray->add($item); } In the case of $_page->save() id does not save. But if I do $_page->save('pagearray') it does. I think it is not the right thing. Probably I am doing something wrong, but I can't figure out what. Please be so kind to help! Edit: Corrected the code
-
I have been messing with some frontend editing for a while and do not think making custom backend for editors is worth the effort in most cases. The interface will most likely be inferior to the one present in admin. Especially with addons like ListerPro. I do think that "modifying the appearance and functionality of the PW interface" is the more easy, cheap and capable way to go. I can see lately there is a lot of useful modifications to PW, like abilities to rename and hide tabs, add new pages from menu, new permissions and so on, making this path easier. Dynamic Roles module is really usefull here (too bad it is not even in modules directory yet). Pro Drafts is on its way. I think maybe creating a custom admin theme with stripped out functionality could be an option. Though I do not know abouit it as I have not tried it. Tom Reno is the man to ask about it) But of course you can do a totally custom backend as complicated as you wish, but I would not do it for anything but submitting an article type of workflow.