-
Posts
1,473 -
Joined
-
Last visited
-
Days Won
16
Everything posted by Ivan Gretsky
-
Please update your $config->httpHosts after session timeout ?
Ivan Gretsky replied to bombemedia's topic in General Support
Do you have exactly the same string in $config->httpHosts and in your vhost configuration? ...and you can alway just leave $config->httpHosts empty to allow anything. -
Merry Christmas to all celebrating according to Julian calendar! I want to share a little antimalware app made by Yandex - a Russian Google kind of thing (may be known to you as the inventors of BEM css class naming convention). Here is their promo site, here is github repo. Hope it will be of no use to us, PW users...
-
Which fields have been changed and to what.
Ivan Gretsky replied to Sradesign's topic in API & Templates
I am not sure I understand what you are trying to implement... Let's guess you are trying to build a frontend edit form for non-admin users. The page edited has to saved after edit. But you do not want to save all fields - only those that have changed. But you still have to somehow determine, which fields changed. Probably, you can do it with javascript and only submit the fields changed. But I think it is not worth the effort in most cases. -
Create New page not showing all templates
Ivan Gretsky replied to louisstephens's topic in API & Templates
Did you change allowed parents/children options on the family tab for your templates? -
Which fields have been changed and to what.
Ivan Gretsky replied to Sradesign's topic in API & Templates
Please provide more details what data should be compared to form submission. If you need to compare your submitted data to some data saved in the regular fields, It seems to be a trivial task. Just get your data from $input and compare it to data from some $page and then send only fields that changed with wireMail. -
As I understood you are proposing: First redirect urls like /index.php/hello to /hello, Then either let PW manage the routing (if /hallo exists, then just show it)... ...or rewdirect it with Jumplinks. So in the module we will have to check option to strip out index.php and then create redirects like /hello -> /new-hallo. Am I getting you right?
-
Hey, Mike! I am not sure if this is related to some other things we talked about before, but anyway... With jumplinks site.com/index.php gerts redirected to site.com. But site.com/index.php/something gets redirected to site.com/index.php.pwpj/something with 301 answer code. Is there a way to make it throw 404 instead?
-
I also think it could be cool to manage PW versions with composer update command. But I think I saw Ryan write somewhere in the forums he will not split the codebase into separate repos. So I do not think we will be as easy to go as just updating composer.json.
-
Ah! You are talking about the Admin page! I thought anything named "processwire" is hidden. Tried it out - it is not. I always rename the admin root, so have almost forgotten it is 'processwire' by default . So no miracles here. Same thing as LostKobrakai pointed out.
-
Wow! Another option! We discussed something similar here. But processwire is not in that systemIDs array. The search in all files from ProcessPageList module for "processwire" did not get me anywhere either. What is the source of that magic? And just like Cerulean I would like to hide branches like that without hooks any modules. Though hooks and modules do exist.
-
Thanks, Martijn! I had a personal conversation with Adrian about this module. There are reasons that it is not in the module directory yet. They are discussed here: https://github.com/ryancramerdesign/ProcessWire/issues/302 and later in that thread https://processwire.com/talk/topic/1176-hiding-uneditable-pages-from-users/page-2#entry84916 I think core admin-view permission support on a page basic is something we can benefit from customizing admin interfaces for editors. That's why I was so interested to find out about the mechanism used for hiding 404 page revealed to me by LostKobrakai.
-
Good day! I am having a problem while upgrading from 2.6.8 to 2.7.2 (Windows, XAMPP). I have made it before on the same site, but now it does not work. Actually I can exen see the unpacked files and folders in the root directory, but I still get this error. Please help! ProcessWire: ProcessWireUpgrade: Unable to locate ZIP: C:/xampp/htdocs/xyz/site/assets/cache/ProcessWireUpgrade/master.zip DEBUG MODE BACKTRACE ($config->debug == true): #0 C:\xampp\htdocs\xyz\wire\core\ProcessController.php(236): ProcessWireUpgrade->executePrepare() #1 [internal function]: ProcessController->___execute() #2 C:\xampp\htdocs\xyz\wire\core\Wire.php(397): call_user_func_array(Array, Array) #3 C:\xampp\htdocs\xyz\wire\core\Wire.php(332): Wire->runHooks('execute', Array) #4 C:\xampp\htdocs\xyz\wire\core\admin.php(93): Wire->__call('execute', Array) #5 C:\xampp\htdocs\xyz\wire\core\admin.php(93): ProcessController->execute() #6 C:\xampp\htdocs\xyz\wire\modules\AdminTheme\AdminThemeDefault\controller.php(13): require('C:\xampp\htdocs...') #7 C:\xampp\htdocs\xyz\site\templates\admin.php(15): require('C:\xampp\htdocs...') #8 C:\xampp\htdocs\xyz\wire\core\TemplateFile.php(182): require('C:\xampp\htdocs...') #9 [internal function]: TemplateFile->___render() #10 C:\xampp\htdocs\xyz\wire\core\Wire.php(397): call_user_func_array(Array, Array) #11 C:\xampp\htdocs\xyz\wire\core\Wire.php(332): Wire->runHooks('render', Array) #12 C:\xampp\htdocs\xyz\wire\modules\PageRender.module(422): Wire->__call('render', Array) #13 C:\xampp\htdocs\xyz\wire\modules\PageRender.module(422): TemplateFile->render() #14 [internal function]: PageRender->___renderPage(Object(HookEvent)) #15 C:\xampp\htdocs\xyz\wire\core\Wire.php(397): call_user_func_array(Array, Array) #16 C:\xampp\htdocs\xyz\wire\core\Wire.php(332): Wire->runHooks('renderPage', Array) #17 C:\xampp\htdocs\xyz\wire\core\Wire.php(458): Wire->__call('renderPage', Array) #18 C:\xampp\htdocs\xyz\wire\core\Wire.php(458): PageRender->renderPage(Object(HookEvent)) #19 C:\xampp\htdocs\xyz\wire\core\Wire.php(332): Wire->runHooks('render', Array) #20 C:\xampp\htdocs\xyz\wire\modules\Process\ProcessPageView.module(187): Wire->__call('render', Array) #21 C:\xampp\htdocs\xyz\wire\modules\Process\ProcessPageView.module(187): Page->render() #22 [internal function]: ProcessPageView->___execute(true) #23 C:\xampp\htdocs\xyz\wire\core\Wire.php(397): call_user_func_array(Array, Array) #24 C:\xampp\htdocs\xyz\wire\core\Wire.php(332): Wire->runHooks('execute', Array) #25 C:\xampp\htdocs\xyz\index.php(241): Wire->__call('execute', Array) #26 C:\xampp\htdocs\xyz\index.php(241): ProcessPageView->execute(true) #27 {main}
-
I noticed that a user with limited permissions (page-view and page-edit) cannot see the "404 Not Found" page in the tree. How is that? The template of that page is "basic-page", so no restrictions on template level. I am really interested, because I wouuld like to find a way to hide pages in that built-in manner. For example, I would like to hide my FormBuilder page. Do you have any ideas how does it work?
-
Where to make the root of frontend development stuff
Ivan Gretsky replied to Ivan Gretsky's topic in General Support
This is what I've been thinking about. There are things like .htaccess that go to root but are still closely related to a project. On the other side there may be more than one template folders in one site directory with some different design... I guess I am still thinking in a "installable template" kind of way. Camilo is talking about something different - code organization in templates folder - but it was an amazing read. I am using a quite a similar pattern. -
Good day everyone! There was some talk about using frontend development technologies like node and gulp and bower with PW. I actually started to incorporate them in my workflow on the latest projects. But I did not make a conscious decision on where to put the root of all my frontend dev ops in the PW folder structure. My first intention was to put my package.json, gulpfile.js and bower.json in the templates folder. Jonathan Lahijani suggested doing so in his epic video. So I've done. But it always looked messy to have node_modules, bower_components, .sass-cache and all the little .json files in there. But now I have a bigger problem - all those files seem to cause errors when running "Translate files" in languages. So I decided to rethink this. Do I really have to put all that stuff in templates folder? Should I put them in site or even in the root folder? That are benefits and downsides of each option? Are there any possible collisions in multisite installations? I ask you to share your experience and thoughts on the topic.
-
@elabx:I found this answer for you. Guess It all makes no sense without ssh.
-
I am yet trying to encorporate this in my workflow, but deployer seems to be valid alternative to capistrano. And it is in PHP, so no need for Ruby. The developer is Russian, so that gives me a little pride. A lot of Capistrano maintainers are also my fellow contrymen - just to point that we not only bomb and confront . @pwired: There seems to be a web interface to deployer too. You can see it on the frontpage of offsite and the source is on github/ At least i think I saw it there.
-
How to use pw to create a guestbook like functionality ?
Ivan Gretsky replied to adrianmak's topic in General Support
Ahh! Got it! You need an admin interface to easilly manage those guestbook submissions. 1) BernhardB's listerpro suggestion is what you want to go for if you have the option to use this paid module. It is really powerfull. 2) You could build a process module to list all guestbook submission for free, but you need to get your hands dirty with code . You can take a look at something like this for an inspiration: class GuestBook extends Process { public function init() { parent::init(); // always remember to call the parent init } public function execute() { $out = ''; $table = $this->modules->get("MarkupAdminDataTable"); // Table header $table->headerRow( ["Name of submission", "By whom...", ...] ); // Selector to get all your guestbook submissions $listing = $this->pages->find("..."); foreach ($listing as $page) { $data = array( // A td with the link to edit the page (you need to change the ... part) $page->title => $this->config->urls->admin . ".../edit/?id=" . $page->id, $page->created_by, ... ); $table->row($data); } $out .= $table->render(); $pagination = $listing->renderPager(); $out .= $pagination; return $out; } public function executeEdit() { // Write code to edit submission } // ... } -
How to use pw to create a guestbook like functionality ?
Ivan Gretsky replied to adrianmak's topic in General Support
Sorry, but I could not understand what you are questioning about. Could you please try to rephrase and be more specific? -
I am not sure that I understand what you are trying to achieve. Why do you want to sanitize $this->pages->get("template=location, title=$lpTitle")? It is not a user input and will return a Page or NullPage anyway. No commas . If you need to get the id just use $this->pages->get("template=location, title=$lpTitle")->id. The notice you are getting is from ProcessXMLImport module and is not directly connected with the code you presented.
-
Maybe this can help you to start off?