Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. 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.
  2. This. You can just use the page->url for the action of your form. No get param needed here.
  3. 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.
  4. 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.
  5. 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.
  6. 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?
  7. $pages->find("template=exhibitions, tags=foo, tags=bar")
  8. 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 ?
  9. If thats the case the PW site wouldnt work at all cause no url exists physically. PW htaccess takes over in the subfolder.
  10. 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 ?
  11. You access /subfolder/processwire/ ? Should work fine as pw htaccess does overwrite any above htaccess.
  12. Not an error only a warning saying theres nothing to foreach.
  13. Im sorry i cant make a full from 0 course of how to build with php html js css and PW. Theres plenty of guides and tutorials around here. It's just you dont need to request a php file in a form. Youd just use the current page url as the action url. Them have your processing code in the template file that page uses. Why dont you start with a simple form without ajax? Once you have that down you can still try to use ajax.I never done a image upload with ajax so not even sure it would work the way you try it. Maybe someone else had the time to give further advise or links.
  14. You could import the md5 passwords as they are and then md5 hash the entered password on the login.
  15. I mean to use a PW page (/some/url/) with its template file to handle all that instead of pointing directly to a .php file. You can't call a .php in templates folder, it would have to be somewhere in the webroot.
  16. I dont think this is working. Theres no form and input fields. Edit: And you can`t call a php in templates folder directly in PW. Why don't you just do it using a real page?
  17. Nothing too obvious. Maybe if you can provide a complete code example of your setup, form and scripts it would be possible to help. Why is this a boostrap file with ob_start and ob_end_clean? And sending the form with ajax? This seems it is not a regular setup. I would test your form getting send and the getting through. I think the problem is not the image not getting saved but not even getting uploaded whatever.
  18. Well if you are logged in and add a query param ?id=1001 to your url and in the template file you add $content .= $modules->ProcessPageEdit->execute(); You'll get the full form markup rendered in your front-end. It even works saving the page out of the box. There's just (quite alot) the css and JS parts missing and maybe some other things that might not work down the road. ? After all it depends what you want to achieve with it and if it's secure etc. I would prefer a Iframe modal solution and just call $page->editUrl(). OR use something like FormBuilder, Fredi (modal solution) or Frontend Edit Core Feature.
  19. You can't use API vars in the selector. You'd have to use the Custom PHP code to build the selectable pages.
  20. Make sure you work with a Pageimage and not Pageimages or something else. It works perfectly. You do $member->avatar->first->focus(10, 10); but before you did $member->avatar->focus(10, 10);
  21. Just doing this in my basic-page template works fine: $page->of(false); foreach($page->images as $img) { $img->focus("10%", "10%"); } $page->save(); $page->of(true);
  22. I've never seen this error. But seems it has to do with permissions maybe (PHP runs as CGI). You should ask your server admin to solve that, it is not your or PW's fault, means it would work on a normal server setup.
  23. Yeah usually it's the php memory limit, but without knowing the error...
  24. So you edited the php.ini but everything else works and it's not a misconfiguration you did? Sorry, I can't help you, ask your server admin to help. EDIT: have you added $config->debug = true in site/config.php ?
  25. Does it show another error message?
×
×
  • Create New...