Jump to content

Recently Updated Topics

Showing topics posted in for the last 7 days.

This stream auto-updates     

  1. Today
  2. I've just installed Valet and have been testing sites running a few different CMSs including PW, Craft and ExpressionEngine. The sites on Craft and EE work fine, but for one of the PW sites I created, I get the home page on every URL I visit, and the other, the home page works OK, but every other page gives me a 'The page isn’t redirecting properly' error. Actually, it's every other PW page, i.e. one ending with a / If I try and visit a non-existent page like example.html, I get the 404 page for the site. Is there something else that needs to be done to PW sites to get them to work with Valet?
  3. Yesterday
  4. @Arcturus Nice. Thanks for sharing. I guess it would be nice to have this as a textformatter too.
  5. @tpr @adrian I have just made a (very dirty) "proof of concept" change to the code so that in the render hook it checks if the view file (e.g. views/template.latte) exists, and if not then returns to the normal render function as it would for admin templates etc. This way, any template that does not have a .latte view file will be run as normal "vanilla" ProcessWire templates. This might be handy in a lot of other situations too (and could theoretically remove the need for excluded templates and the logic to test if we are trying to render the admin template etc.). Could make for easier porting of an existing site - only running the latte code for templates that have been migrated, leaving the rest of the site running as-is. Are there any major downsides to this (other than my messy copy/pasted code)? The code is in this commit: https://github.com/porl/TemplateLatteReplace/commit/63ff03059a5278806d5525a1bb8f10fb8e9b3cf1 but I didn't want to do a pull request as it is definitely not the most elegant method of doing this check - just copied a chunk of code from your render latte string function) and there is already my pull request open for allowing for no default layout files. Let me know what you think - it certainly solved the Tracy console issue at least
  6. Hi @bernhard, I gave this module a try to see if it might be a good way to get data for a CSV download (on the front-end). But I'm having trouble getting off the ground. I installed the module, put some demo code in my template file... $rf = new RockFinder2(); $rf->find("id>2, limit=5"); $rf->addColumns([ 'title', 'modified', ]); ...and I get this error: The same code seems to execute in the Tracy Console in the back-end without an error. Is this module only for use in the PW admin? I had trouble understanding the GitHub readme - are those just notes to yourself? It wasn't clear to me how the SQL examples at the top of the readme relate to the module, and several of the code examples use "new RockFinder()" when this module class is RockFinder2.
  7. Just pushed version 0.0.5 to GitHub. I changed the namespace to "ProcessWire". @matjazp Thanks for the hint.
  8. Easiest thing to do is to add some custom CSS to admin.css, e.g. body[class*="editor"] #notices { display: none; } that would hide all notifications for role "editor". Or some variation thereof, e.g. body[class*="editor"] #notices .NoticeDebug { display: none !important; } body[class*="editor"] #notices .NoticeMessage { display: none !important; } The cleanest way would be if this core module would have an in-built permission, then you could handle it normally via the PW access system.
  9. Update: Menu Builder 0.2.7 Changelog Added the property extra_fields for use with getMenuItems() ONLY. This enables returning the page field values for some selected Fieldtypes. For example, the description field in the page corresponding to the menu item. Thanks @e0f for the inspiration. Full documentation of this new feature is available here. Menus in multi-lingual sites can now be called using their multi-lingual titles or names irrespective of the current user's language. For example, a multi-lingual site with English, German and Finnish languages could have a menu with the respective titles My Awesome Menu / Mein Tolles Menü / Oma Mahtava Valikko. Any of these titles can be used in the code to call the menu (using render() or getMenuItems() methods). [PS: blame you-know-who for these language translations :-)] Changed the way new menus are added. Only one menu can be added at a time. The title field/input is multi-lingual ready. See screens below. Improved the backend GUI when viewing locked menus. Only the menu items and and exit button are shown in such cases. Updated the documentation Refactored code to improve efficiency. In dev branch only for testing. Screenshots a. Add Menu (Multi-lingual) b. Edit Menu (Multi-lingual) c. Locked Menu d. An example usage of extra_fields (I am no designer, so yeah, nothing much to see here...but you get the idea :-)) Thanks for testing!
  10. EDIT: Turns out it is still working with PW 3.0.144. The error happens when you have two image fields and one of them is empty. I had to make both image fields an array in the settings to solve the error. now everything works as expected. Maybe someone can confirm this bug and make a suggestion how to solve it in the module code?
  11. Sounds about right. Unfortunately, I've been too busy to try out the module properly and give more useful feedback 👽
  12. Hey Erik, here's a suggestion how you can do it manually, at least for those templates that have an AMP version. But I haven't tested it. Remove the specific template from the "Templates for automatic tracking" configuration and Add this specific template in the "Templates for allowed API tracking" configuration In the non-AMP version of the template, you add the following data atrribute to the body tag, with the ID of the current page which should be tracked. For example: <body data-phc="<?php echo $page->id; ?>"> Now manually add the tracking script for the non-AMP version before the closing body tag. <!-- For debugging use PageHitCounter.js --> <script defer src="<?php echo $config->urls->PageHitCounter; ?>PageHitCounter.min.js"></script> That's it.
  13. Thanks for the update! It would be brilliant if you could take a look at two issues that I experience using the new custom image/file data (which were introduced in 3.0.142). This feature seems to be not that stable in repeater context and multi-language context...
  14. @Jens Martsch - dotnetic That is more or less the same that I did. Not pretty, but works:
  15. Sorry yes my mistake its an auto-appended file not a template.
  16. Last week
  17. Tested with ProcessWire 3.0.149, no errors so far. However, it's terrible slow, especially admin, worst when using ListerPro. For example, there's a page with 5 children, the lister shows 5 results, execution time > 5,000 ms. If you open the config of that lister, execution time is > 8,900 ms. Go to Pages (pages tree), execution time > 2,000 ms (for just a few test pages). Cluster insights shows load average 1-minute peaks above 3 (1 vCPU cluster), for just one user, a few clicks. 5-minute peaks are around 0.9. CPU usage is ok./low (~ 7.5 %), memory usage ~ 80 % (1 GB RAM). Of course, this combination (PW + DO database cluster 1 vCPU/1 GB RAM) cannot be used at the moment. I try to continue researching.
  18. Thanks @Robin S - lazy of me to not check the settings for that. Thank you!
  19. ah thanks dragan, unfortunately i didn't get to test that in the end. I worked around the issue so i didn't need to have them collapsed after all. but looks like it should work.
  20. You can try to fine-tune the DB https://dev.mysql.com/doc/refman/5.7/en/fulltext-stopwords.html And for advanced stuff, you can play around with fulltext searches (raw mySQL queries).
  21. Just saw my site was featured in this week's newsletter! Thanks guys 🙂
  22. Found what was going on and created the issue https://github.com/processwire/processwire-issues/issues/1076 I would still be happy if someone else coud test it...
  23. I would just probably add a new ckeditor span with a class so editors could apply manually. That would also allow excluding headlines.
  24. Go back to modules and install the second part of the module called "Duplicator - Packages Manager". Afterwards you can manage your packages.
  25. Yeah, sorry about that - the Tracy core just uses PHP's mail() and I wasn't sure how to hook into the send process so I could implement wireMail - of course it turned out to be easy, but it wasn't documented so had to dig a little.
  26. I might have some experience on this matter 🙂 @Haagje R. you've got a PM.
  27. Actually, the .gitignore in PW root is a nice starting point already. Some of the things I would probably add: *.notes *.sql *.zip site/assets/cache/* site/assets/ProCache* site/assets/pwpc/ site/assets/sessions/ wire/ .sql + .zip are most likely local backups, so I def. don't want them included site/assets/... stuff depends - cache (regular + ProCache) stuff + sessions I'd also not want to carry over. wire/ should certainly not be part of a repo. btw: .notes is just how I store login details; Apache blocks web-access to any files starting with a dot anyway, but you don't want to take chances, so I added this to .gitignore too.
  1. Load more activity
  • Create New...