Jump to content

adrian

PW-Moderators
  • Posts

    11,092
  • Joined

  • Last visited

  • Days Won

    365

Everything posted by adrian

  1. Glad to hear it's working for you - hopefully this new approach will work in all scenarios. As for debugging debug.innerHTML - I haven't had to debug it yet - it's mostly generated by Tracy anyway. Being a JS variable, there isn't really an easy way of making it multiline without concatenation, which really isn't worth the trouble in this case. I am looking forward to Template Literals in ES6 though - we'll finally have real multiline variables for JS. But, back to your question, - if you do need to debug code like that you can use the regex find & replace option in your editor to replace \\n with \n and \\t with \t and it will be fully formatted. In Sublime Text (in case you use that), click the asterisk in the find and replace box - super easy!
  2. @matjazp - just letting you know that the latest version includes the fix for your problem. Could you please let me know if it works for you?
  3. Thanks @matjazp - that helped - I had forgotten to consider text after the last closing php tag. I have a fix that is working here. I have something else I am working on with Tracy right now so I'll commit both things fairly soon.
  4. 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.
  5. 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.
  6. 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/
  7. 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.
  8. 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.
  9. Thanks for your efforts on this anyway Benhard!
  10. This can now be done - go to Modules > Core > ProcessPageAdd and you'll find the setting.
  11. 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.
  12. 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 }
  13. 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!
  14. Just go to settings for the core module ProcessProfile and check the avatar field.
  15. 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!
  16. 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
  17. 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
  18. 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.
  19. What happens if you save after removeAll(), before you add the new one?
  20. New version just posted today as beta:
  21. 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?
  22. 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 !
  23. 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.
  24. Yeah - it sounds like maybe something is hooking into Session::login() I'd grep your site/modules directory for that hook.
  25. 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.
×
×
  • Create New...