-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
There's a special block in the PW htaccess commented out to redirect all requests to https if it's not.
-
-
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?
-
Maybe you should post this in the Duplicator module thread....
-
-
Can't reproduce it.
-
Works just fine. What is your setup? Where is this field etc?
-
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();
- 11 replies
-
- 7
-
- pagination
- get
-
(and 2 more)
Tagged with:
-
Process Memory is going high and admin panel is becoming slow
Soma replied to Mirza's topic in General Support
- 1 reply
-
- 1
-
- large pages
- slow performance
-
(and 2 more)
Tagged with:
-
Language Page Edit Permissions - Problem with creating new Pages
Soma replied to Orkun's topic in General Support
I filed an issue on github. https://github.com/processwire/processwire-issues/issues/631 -
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.
- 11 replies
-
- pagination
- get
-
(and 2 more)
Tagged with:
-
This. You can just use the page->url for the action of your form. No get param needed here.
- 11 replies
-
- pagination
- get
-
(and 2 more)
Tagged with:
-
[Solved] PW3 - Set Field Value Using Checkbox Query
Soma replied to ridgedale's topic in General Support
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. -
[Solved] PW3 - Set Field Value Using Checkbox Query
Soma replied to ridgedale's topic in General Support
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. -
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.
-
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?
-
$pages->find("template=exhibitions, tags=foo, tags=bar")
-
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 ?
-
If thats the case the PW site wouldnt work at all cause no url exists physically. PW htaccess takes over in the subfolder.
-
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 ?