Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Soma

  1. There's a special block in the PW htaccess commented out to redirect all requests to https if it's not.
  2. Do you mean this? (ProcessPageEditImageSelect)
  3. It's all there. When I was starting with PW years ago, I very soon looked at modules and all the Process modules that make the admin. So I never really needed a tutorial, just look and learn copy and try. It was so simple and since it's all in the same fashion using the already familiar API and "normal" modules. So you have a ton of modules Ryan has already built that make ProcessWIre backend you can use as examples/learning. Isn't it nice?
  4. Maybe you should post this in the Duplicator module thread....
  5. Have you installed both modules? It looks like it's not as automatic as it could be.
  6. I would install a new PW and test it. If it works it's something with your installation, maybe some settings or module?
  7. There's not special permission. page-view and page-edit the usuals. Yes it's in a repeater-matrix.
  8. Works just fine. What is your setup? Where is this field etc?
  9. Make sure you have a filter form that action url is the $page->url. I don't know what the problem is really but it's all getting too complicated for what it really can be (dead simple). Example filter form for a paginated result list : <?php namespace ProcessWire; $filter = ""; $form = $modules->InputfieldForm; $form->attr("action", $page->url); $form->attr("method", "get"); // select with sort options $f = $modules->InputfieldSelect; $f->attr("name", "sort"); $f->label = "Sort"; $f->addOptions(array( "-title" => "descending", "title" => "ascending" )); $form->add($f); // submit button $f = $modules->InputfieldSubmit; $f->attr("name", "filter"); $form->add($f); // process form if(count($input->get)){ // processes and populates form fields $form->processInput($input->get); // if sort is not empty if($form->get("sort")->value) { // build filter and add to whitelist so it gets picked up by pagination $input->whitelist("sort", $sanitizer->selectorValue($form->get("sort")->value)); $filter .= ",sort=" . $input->whitelist("sort"); } } $result = $pages->find("template=basic-page, limit=2{$filter}"); $content .= "<h2>Show Results</h2>"; if(!$result->count) { $content .= "<p>no results</p>"; } else { foreach($result as $res){ $content .= "<p>$res->title<br>$res->url</p>"; } $content .= $result->renderPager(); } $content .= $form->render();
  10. I filed an issue on github. https://github.com/processwire/processwire-issues/issues/631
  11. Thats not really needed for this problem. Why complicate things unessecary? This wont work when using a get param to filter result with i paginated results. Ones you can add with using input whitelist.
  12. This. You can just use the page->url for the action of your form. No get param needed here.
  13. This in site/ready.php works just fine for me (using basic-page and the summary field instead) <?php namespace ProcessWire; wire()->addHookBefore("Pages::saveReady", function($event) { $page = $event->arguments(0); if($page->template == 'basic-page') { if($page->maintenance) { $page->of(false); $page->summary = wire("user")->name; } else { $page->of(false); $page->summary = ''; } } }); Does you hook even trigger. Easy test would be to add exit("hooked"); in your hook.
  14. I don't think this $user is available in the scope. $page->maintainer = $user->name; $page->maintainer = wire("user")->name; I don't think if you use hook BEFEORE, the page save is going to have the page field already updated. So if a value is changed you won't see it yet in the page object changed at that point. Also a hook on Page::save and you save the page in your hook gonna create a infinite loop. You should try either hook after save or use Pages::saveReady where it's right before saving the data. You can update the field and don't even need to save the page as it's already doing that after your hook.
  15. Strange that it's loading forever? PHP doesn't get involved and timeout? Normally it's 30s. I would try empty the modules caches table in DB. Back it up first. That's also the modules and FIleCompiler cache.
  16. Is it endlessly redirecting or just loading? What happens after it? Does it end? If you turn on debug mode? Delete Modules cache? What if you install PW on the other server and just import the DB and the site/assets/files site/templates site/modules folders?
  17. $pages->find("template=exhibitions, tags=foo, tags=bar")
  18. Then my guess is there's no htaccess in PW folder, or it's not working. Edit: can you access /subfolder/site/assets/active.php ?
  19. If thats the case the PW site wouldnt work at all cause no url exists physically. PW htaccess takes over in the subfolder.
  20. If you install PW in a subfolder there you have the PW htaccess so you should be able to access /thesubfolder/processwire/ just fine. If typo3 has rules to folders that exists, it would be wrong. I don't see anything in the typo3 htaccess that does that. Edit: Oh my 6666's post ?
  • Create New...