Jump to content

dragan

Members
  • Posts

    1,982
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. There's also an option in Batch Child Editor (for edit + upgrade modes): "overwrite names" But of course, that's meant to be used as batch actions, so you'd always have to select a parent, to edit its children. On the page you're on (page-edit), it won't do anything on its own.
  2. That's just the way it works. Once a page is saved, you have to manually edit the page-name. Only when you first create it, it takes the title string and creates the name from that. I guess the reasoning for this is that you shouldn't change page names too often, to avoid too many 403 errors. There's a module, however, which probably does exactly what you want: https://modules.processwire.com/modules/page-rename-options/
  3. Why is that? Surely, if you change the name in the module, next time you refresh modules, the name of the page in admin/setup/ will also change?
  4. I only ever use BS or Foundation just for the grid, mixins and helper / utility classes (.visuallyhidden et al) + normalize (S)CSS. There's nothing wrong with it, and I don't understand people who claim that "every site built with BS looks the same" (or that is has to). It's just a tool. It doesn't dictate anything. As for components, I'm cherry-picking and choose the "best in class" (e.g. PhotoSwipe for lightboxes, Flying Focus) or build my own. An accordion or tab component is a trivial thing to build, and at some point (if you have a very custom design) it's easier than tweaking an existing solution. But of course - it all depends... on budget, deadlines etc.
  5. Admin on Steroids has an option where you can map CTRL + S to the save function. That way you don't even have to care about the button's position (but might be a bit overkill if you only need this module for only this feature).
  6. @Macrura Did you create a template (without file) according to Ryan's "how to" (step 3) ? Perhaps you have to only replace _ with - in your template name. From what I gathered, it should be a - character, not _.
  7. @Macrura Are you doing a search of some sort? i.e. using a selector? A field name like author_images_randomgibberishstring sure looks strange. Did you name it like that? In "regular" image fields I found the new feature works just fine, also with multi-language. Maybe you are using an image field inside repeaters?
  8. Do you check as logged-in superuser or guest (e.g. incognito mode)?
  9. @matjazp Perhaps you should take a look at Markup Cache or Wire Cache instead. They're powerful tools, and often overlooked.
  10. @Tom. You should bookmark the custom search in my sig (or one of the various others that exist) - you'll find stuff much, much faster 🚀
  11. Maybe you need a recursive function? Take a look here in the PW profile: https://github.com/processwire/processwire/blob/dev/site-default/templates/_func.php#L76
  12. Just update site/config.php If you want to keep the same config.php locally and remote, add a simple if statement or switch/case if ($_SERVER['SERVER_NAME'] === 'dev.mysite.com') { $config->dbHost = 'foo.mysql.db.host.com'; $config->dbName = 'xxxxx'; $config->dbUser = 'xxxxx'; $config->dbPass = 'xxxxx'; $config->dbPort = '3306'; }
  13. Is ACE Tracy's console editor? If so, then ALT-GR works for me (Windows).
  14. @bernhard Thanks for the hints. I didn't notice I was uploading .otf files instead of .ttf - my 2nd facepalm moment yesterday... As to the other issue I mentioned: I found out it's not related to RockPDF at all. I got some really weird issues with render() / wireRenderFile() - but only when I ran my code inside Tracy console. In a regular template everything works as expected. The issue was with matrix repeaters that are called with $child->render('offer_matrix') inside the template, where I use field template files* - suddenly PW wouldn't find these anymore. * site/templates/fields/matrix.php site/templates/fields/matrix/body.php site/templates/fields/matrix/gallery.php site/templates/fields/matrix/slideshow.php etc.
  15. Maybe a directory traversal attack (to install backdoors or whatnot). I would immediately contact the hosting company, and also check for suspicious files. Lock down your forms, or any other potential areas that allow user-input.
  16. Another issue: If I use wireRenderFile(), I get this fatal error: This used to work just fine with the previous version (v.7x), and the assets/file/ folder definitely exists.
  17. Yeah... using inline SVGs works just fine... until you want to style fills or strokes via CSS. I have updated rockPDF just now, and noticed that there's something buggy with using custom fonts. I have the fonts both in site/templates/fonts/ as well as in site/assets/RockPDF/fonts/. I have now also placed them in site/modules/RockPdf/vendor/mpdf/mpdf/ttfonts, cleared modules cache, but the error persists. I've looked into the module code, and presumably somewhere here the paths are defined: public function init($options = []) { // make sure the assets folder exists $this->wire->files->mkdir($this->wire->config->paths->assets . $this->className . '/fonts', true); $this->settings($options); } public function settings($options = []) { // merge defaults $defaults = [ 'tempDir' => $this->wire->files->tempDir('RockPdf'), 'fontDir' => [ __DIR__ . '/vendor/mpdf/mpdf/ttfonts', $this->wire->config->paths->assets . $this->className . '/fonts', ], ]; $options = array_merge($defaults, $options); Any clues how to fix this?
  18. Sorry, didn't fully read your post (re: SVG) - pls ignore this post.
  19. This is not a question about PHP, but a matter of your frontend. You should look into the Cache API, indexedDB and service workers. What you probably want, it to build a progressive web app. https://github.com/pazguille/offline-first https://ponyfoo.com/articles/backgroundsync https://www.twilio.com/blog/2017/02/send-messages-when-youre-back-online-with-service-workers-and-background-sync.html https://github.com/pulseshift/lunch-pwa https://github.hubspot.com/offline/docs/welcome/
  20. @cosmicsafari Well, you could take a look at the BCE module... Did you look at server logs? Did you also try with a very small CSV file - maybe it's not the size of the files, or the time it takes to process everything, but some stumbling blocks in your code ? I would first try it with adding output formatting set to false, and then also use sanitizers (you can never trust user input), or at least trim(). I also noticed this line $p->name = $name.'('.$lat.','.$lng.')'; which doesn't look OK. PW page names can't have special characters like (). Use the page-name $sanitizer and get rid of the () (or any other non-allowed characters).
  21. yeah well... no matter what system you use, that's a bad idea. Tracy Debugger can wreak havoc if used by non-trusted users (terminal, Adminer, console etc.). But you don't want to remove and install it again each time you log in as legitimate superuser, do you?
  22. @hollyvalero I tried it as well (hook is also in site/ready.php), and everything works just fine. Just copy-and-pasted the hook, and used the list example, and adjusted the selector. It even works within a partial I load via include_once() and cache the output with MarkupCache 🙂 Do you run an ancient PHP version, by any chance? See Ryan's note about PHP < 5.3 Also, did you find any hints with Tracy Debugger?
×
×
  • Create New...