Jump to content

adrian

PW-Moderators
  • Posts

    11,191
  • Joined

  • Last visited

  • Days Won

    372

Everything posted by adrian

  1. Is your site available on the web somewhere, or just on your local dev setup? If you'd be willing to PM login details, I'd be happy to take a look.
  2. The position of the Tracy script after </html> might be a little weird - I am not sure their reasoning for this, but it's definitely a core Tracy thing, rather than an issue with this module. Take at look at their demo page and you'll notice the same thing: https://nette.github.io/tracy/tracy-exception.html As for the extra "?>" - that looks to be related to the Variables panel - I am injecting code into the end of the compiled template files to make this work. I thought my regex was handling all scenarios, but perhaps not. Could you please try clearing your FileCompiler templates cache and let me know if the issue remains. If it does, please post the last few lines of your template file so I can test here and fix it.
  3. Perhaps this module from kongondo will let you do what you need without need to add your own hooks: http://modules.processwire.com/modules/fieldtype-runtime-markup/
  4. Hi @citech and welcome to the forums. The problem is that yo can't directly call any php files inside the templates folder. There are lots of options to deal with this, but the simplest for you at this point might be to put the file outside the site folder - at the root of your site, or in a subfolder at the root.
  5. Hi @planmacher - it looks to me like your setup should work. The one obvious thing to check is that the "name" of the Projekte page is actually "projekte" - I assume it is, but it might be different. Can you confirm that first before we investigate further? EDIT: I just realized - you also need to make sure that projekte role has edit permissions on the home template that inherit down, or on the template of the Projekte page.
  6. Thanks for your efforts on this anyway Benhard!
  7. This can now be done - go to Modules > Core > ProcessPageAdd and you'll find the setting.
  8. For those of you who haven't seen it: https://github.com/buunguyen/octotree - it's a great extension for navigating projects. There are versions for Chrome, Firefox, Opera and Safari.
  9. Just following up on this - for my future benefit as much as anyone else's This option from Ryan is a better approach and should work in all situations. $process = $this->wire('process'); if($process instanceof WirePageEditor) { // tell us that user is currently in: ProcessPageEdit, ProcessPageAdd, ProcessPageListerPro, // or anything else that bills itself as able to edit pages and implementing getPage() method. $page = $process->getPage(); // $page is now the page that is being edited }
  10. Hi Esther and welcome. Unfortunately that is a pretty vague question. The content of every website is output as HTML. Are they designing your landing page, or coding it in HTML? If we can get some more details we can provide a more accurate answer. But, the short answer is yes!
  11. Just go to settings for the core module ProcessProfile and check the avatar field.
  12. Hi @Ipa, It's working fine for me on Safari, Chrome, and Firefox on my Mac with Sublime so I am guessing it's an eclipse issue. I wonder if it could be solved in your applescript with the urldecode line from this snippet? using terms from application "Quicksilver" on process text theurl return do shell script "php -r 'echo urldecode(\"" & theurl & "\");'" end process text end using terms from https://qsapp.com/wiki/Encode/Decode_URL_(AppleScript) or maybe one of these options: http://harvey.nu/applescript_url_decode_routine.html http://macscripter.net/viewtopic.php?id=3675 If that doesn't work, here is the route of the "problem": https://github.com/adrianbj/TracyDebugger/blob/master/tracy/src/Tracy/Helpers.php#L49 Of course that is part of the Tracy core so I'd rather not edit it. I did however test with Sublime by removing the `rawurlencode` on that line and it works fine. Maybe if you can't get Eclipse to work, you could post on the Tracy forums to see if they would remove the encoding, although I expect it is important if there are spaces in the path? I'd actually like to start compiling a list of resources for all of the various editors and platforms. I will add these to the module's readme as they are provided by you guys!
  13. I haven't done this, but I think you are correct in assuming that getMatchQuery() is what you need to have: https://github.com/ryancramerdesign/ProcessWire/blob/8eb350b0362c1c70003d3895c6961b3a1655ffc5/wire/core/PageFinder.php#L588 Take a look at kongondo's Matrix for an example of a 3rd party module using this method: https://github.com/kongondo/FieldtypeMatrix/blob/master/FieldtypeMatrix.module#L507
  14. Sure that will work, but I still think it's better to create the PDF in a temp directory Also, just an FYI, building the path up using: $path = wire('config')->paths->files . $page->id . '/'; is not ideal. This is better: $page->filesManager()->path() because it handles custom paths just in case you have $config->pagefileSecure set to true, or if you have $config->pagefileExtendedPaths true. But still if you are using a temp dir, then this won't matter anymore
  15. Any chance it has to do with where you are generating the pdf? I would do it in a temp directory first - I think there is likely a conflict with saving it to the assets/files/xxxx folder of the page and then adding it to the same page.
  16. What happens if you save after removeAll(), before you add the new one?
  17. New version just posted today as beta:
  18. Two things stand out to me: Suhosin and suPHP. Neither of which may be the issue, but might be worth investigatng a little. I know that suhosin can be a pain - I used to use it but eventually found I was spending too much time configuring it to extend its limits anyways. As for suPHP - there is this thread: https://processwire.com/talk/topic/6088-cannot-allocate-memory-errors/ We never got a final resolution from the OP, but I did note that the error he was getting was common amongst suPHP users. Is there by chance anything in your error logs that mentions memory errors?
  19. Hi everyone, I have just set up the ability to customize the potocol handler for opening files in your editor directly to the line of error - this is potentially a huge timesaver The new config setting is "Editor Protocol Handler": It is initially configured for SublimeText because that is my editor and I know lots of you also use it. To make things work, grab this free subl:// protocol registering app: https://github.com/saetia/sublime-url-protocol-mac - note the instructions at the bottom if you need to make it work for ST2 instead of ST3. If you're not using ST, there are other ways to set up your own custom protocol handler, but I'l leave you guys to figure that out. Once you have done that you will be able to click on any of the links in errors, dumps, and barBumps and it will open the file in ST to the exact line. Note: the links are to the actual original files, not the PW 3.x compiled versions !
  20. Migrator can definitely do this sort of stuff. It hasn't seen much love of late (although I did just commit a quick patch for a bunch of Notices that I had been ignoring - Tracy made them too hard to ignore). Anyway, I still use the module regularly in my own development and rarely have any problems. I can't imagine working without it when setting up new sections of content for an already live site - just build the fields, templates, and pages in dev and then export/import and you're done. I do always test the import on another dev setup before importing to production as a check. That said I know there are still some issues to be dealt with. However, I have tested it successfully with a multi-language setup and with all the Profields (except Matrix Repeaters) and normal repeaters. I still want to get back to sorting out the last of the bugs, but some have been hard to reproduce. I would be curious to see if it works well for your needs.
  21. Yeah - it sounds like maybe something is hooking into Session::login() I'd grep your site/modules directory for that hook.
  22. Ok, what about getting $user->id and $name after this line: https://github.com/ryancramerdesign/ProcessWire/blob/980ce4f0be2054dfbad4a7b334d35bdca42da7da/wire/core/Session.php#L440 We know that a $user object is making it into the login function so we need to figure out where it is getting messed up. Maybe it's not passing the: if(is_object($name) && $name instanceof User) { condition for some reason? I hope I am not taking you on a wild goose chase here - this is pretty bizarre - I feel like I am missing something obvious.
  23. I am not surprised that $user is undefined on 436 - it isn't passed to this function. Try echoing $user->id at 453. What about in here: line 505? public function forceLogin($user) { echo $user->id; return $this->login($user, '', true); }
  24. Firstly, this should be sufficient - you don't want to try logging in more then once. $u = $users->get(4930); if ( $u->id ) { $session->forceLogin($u); } The first part of That error message is coming from: https://github.com/ryancramerdesign/ProcessWire/blob/980ce4f0be2054dfbad4a7b334d35bdca42da7da/wire/core/Session.php#L520 which shows that it is definitely receiving the $name populated as "guest". I realize that isn't what you are passing to it - so I am definitely confused The second part is coming from: https://github.com/ryancramerdesign/ProcessWire/blob/980ce4f0be2054dfbad4a7b334d35bdca42da7da/wire/core/Session.php#L488 which checks this: $user->id == $this->wire('config')->guestUserPageID I'd love if you could echo out the contents of $name and $user in that login function (starting here: https://github.com/ryancramerdesign/ProcessWire/blob/980ce4f0be2054dfbad4a7b334d35bdca42da7da/wire/core/Session.php#L435) to see what it is receiving and see if you can figure out at what point in that fuinction it is failing.
  25. If it's just a password generator, then why are you assigning $name to its results? $name = self::passwordGen(); I suggest you start by taking the output of $name and $pass (from that echo line) and in a template file try the login command there to make sure it is working. I would also like to know that the new user is definitely being created and the roles you want are being successfully added. I still keep coming back to that initial error - it suggests to me that the user you are trying to login is "guest" which suggests there is something wrong with $name or $user depending on which you try. It also might be related to overwriting $user - have you tried using $u ?
×
×
  • Create New...