Jump to content

Macrura

PW-Moderators
  • Posts

    2,756
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Macrura

  1. Hey - cool suggestion; Since Selectize.js is part of the core, this seems like a job for a new module (or hook) – the module/hook would basically initiate the selectize.js assets to be added to the page, as well as a custom js file that would initialize selectize on that field. If I have some time I'll take a look at it..
  2. i added it, but Github seems to be having a bad day; I also noticed a whole bunch of other new stuff that wasn't committed in the repo, mostly stuff that is attributed to you; I pushed the latest up to GH, and hopefully it will work the same; I haven't had a chance to test it yet today, but will do so soon...
  3. Sorry for the delayed response; I'm not sure about this – I will have to look into it, but too much work atm; I should have time in October - hopefully it won't be too late!
  4. wireSendFile, forceDownload https://processwire.com/api/ref/functions/wire-send-file/
  5. There are just a lot of possible reasons, so hard to say what's happening; You need to check logs, see what the actual errors are, which files errors are in.. explain your complete plan/process as to how you are going to upgrade this. You don't even really need to download and upgrade it; I've done dozens of upgrades on live sites. I'd be more concerned about the PHP version upgrade than the PW upgrade; I've had close to zero issues with PW core upgrades; Issues if any usually come from modules or front end code. Before i upgrade any PHP version that a site is running on, i first upgrade everything to ensure compatibility and then do incremental upgrades if the server offers multiple PHP versions - 7.2, then 7.3; 7.4 seems to have the most breaking changes and i'm currently upgrading many sites and finding 7.4 to be the hardest upgrade.
  6. Here are some quick items to consider, based on how I would upgrade a site: - start over, back to the original version (2.5) - Login as superadmin - enable debug mode from the config - Make sure the site is fully functional on localhost in the original version; if there are PHP errors/warnings on the front end, e.g. related to php version, fix those first before upgrading the site - Upgrade any modules that are compatible with 2.5 - once the site is running with no errors on 2.5, upgrade the core to latest stable version if you replace the htaccess, make note of any settings that need to be copied over (www, https, pro cache etc) - upgrade all modules to the latest using the upgrades module Note that the new core compiles the non-namespaced files. You can clear the filecompiler cache (bottom of modules) if you see any errors related to that, if you still see no content on the homepage, check for js/browser errors; Check how assets are being referenced; paths could not be resolving.
  7. Many thanks for your post and help! All has been revealed, and some facepalm moments... (1) had to change $config to wire('config') (?‍♂️) (2) had to set Tracy config to show in dialog (?‍♂️) (3) Yep, i'll just tell people up front if they need to put something in front of it, they need to move the widget..
  8. Couple of questions and issues... (1) For some reason I can't get this to work at all; not sure why but my hook is in ready.php, and the markup is not appended to the form. I put my js into ACF ProcessPageEdit.js and that works, but it would be interesting to know why the code above didn't work, in case i wanted to keep the js file along with my other hanna code stuff. (2) I enabled Tracy in the form (module config), but not getting any tracy...not loading. Wondering if there is any way to troubleshoot that. (3) The CK editor widget things are great, makes it much easier for editors to see where a code is, and of course double click it to edit parameters. But one thing that is tricky is getting the cursor in front of a widget, if it is the first thing in the editor. For me no problem of course i can just switch to code mode and put in some placeholder in front of it; but for the average user, i do wonder if there is any solution to this... thanks!
  9. yep - since the settings definitions are defined in json or php files they can be copied from site to site and then setup in the admin (simply create a page under /admin/ and then set the process as SettingsFactory, then type in the path to the settings definition file). In terms of exporting actual settings, like the values, I have thought about that as well, as it would be nice to be able to back up the settings for any given single settings configuration.
  10. thanks - i saw that, and commented over there.
  11. Thanks!! - i just did another test and figured out the problem – tt only recognizes the shortcodes if you have the Hanna Code textformatter applied to the field. I'm not actually using Hanna Code, i'm processing the shortcodes with my own textformatter, but using your module to enable editing of my custom shortcodes... In any case, you're right and it completely works now; I have the Hanna Code Textformatter after my textformatter so it won't do anything (the codes will all be processed by the time it hits that one)..
  12. Settings Factory was created precisely for this use case - no need to create a module, module config; You can also keep your fields in your module with default values, and let your site admins override those in the Settings Factory "settings". To put it simply, if you are building out module-like code on the front end, but need to expose settings for things to your editors, Settings Factory has the ability to create unlimited settings pages, each with their own permissions...
  13. depends on what you are doing – if you mean that you can't access the api vars inside a function, that's one issue; usually i put all of the helper functions inside /site/templates/helpers/ and then include them in the template folder _init.php file and that definitely works. If you need to use those in the admin then that's also a different thing, but in short you should be able to do some quick tests like write a simple function in the ready.php file and see how it works.. then move it to your include file and see if it still works...
  14. @Robin S I'm having some issues with getting this to work – using the latest PW, and Hanna Code, and Hanna Code Dialog; The field with the hanna codes (body) isn't wrapping the codes so they just look like text and don't get identified as widgets. Not sure what i'm doing wrong; Tried uninstalling everything and re-install, but since the upgrades, no widgets; The HCD was working fine before I upgraded it... thanks for any insights you might have - looking forward to using this on a particular project..
  15. You might also want to try Batch Child Editor, which is a free module that has CSV export: https://processwire.com/modules/batch-child-editor/
  16. Not that I know of; But this forum has heaps of code examples. Writing an export script would assume a decent knowledge of the PW API, and a certain basic level of PHP. If you are willing to invest some money, then you could simply purchase ListerPro, and then use the ListerPro Page Action: Export pages to CSV file "This action enables you to export all pages matching your ListerPro query to a CSV/spreadsheet compatible file."
  17. Correct, ProFields Page Table is the one that comes for free with PW. Profields Table is not the same thing.
  18. That's for ProFields Table, but the OP appears to have this info stored in a Page Table. As far as I'm aware there is no way to export the data in a Page Table without writing a custom script.
  19. I noticed that there is an option to "Open Home/View site in new tab (topnav)", and i have that checked. But when i select the menu item called "View Site" in the top nav, it doesn't open in a new window. So i wanted to report that as a possible bug. This is on UIKit admin theme. Also it would be cool if we could have an option for view links on the page list open in a new tab, if that isn't already an option somewhere that i missed...
  20. The usual way that I would do it is to create a service URL* on the 2nd website, which returns JSON to the ajax request, if you're going to load the comment markup and form via ajax. Alternately you could use an iframe, so the 2nd website would have an output template to render the comments thread and form; this could be a single template/page with get params; I don't see any benefit or reason to use multi-site / multi-instance (but maybe i'm missing something), unless it makes managing comments for an article easier; but you could also create a field in the comments site that pulls in the title or other info from the main install, using a service page on the main install, returning JSON response; In terms of the service "page" or URL - there are some new api features that will allow you to have a service URL without having to actually create a page as an endpoint. https://processwire.com/blog/posts/pw-3.0.173/
  21. I think it's a good idea and plan – plus if your main site is cached with something like procache, you could load user comments via ajax from the subdomain "user" site. I'd probably do it the same way as you; It's sort of like making your own version of a commenting platform which is integrated into the site, like Disqus or something. And if eventually at some point you had a huge user base, you could run the entire subdomain on a different server.
  22. There should be examples of fieldsets defined in the samples folder, but using PHP. I don't think you can do fieldsets fro JSON defined settings, but the tabs fieldsets example shows "Advanced Settings" which are each in a fieldset.
  23. @gebeer My assumption is that most people use URL fields to store external URLs. So we don't have any way of preventing these external sites from using commas or encoded commas in their URLs; If the URL field is supposed to store this external URL, then it should not modify the URL because then the link to that external site won't work, so the field is kind of useless at that point. The only reason i can think of for sanitizing that %2c would be for security of the database; but in that case there should be some way of reconstructing the original URL so that it doesn't result in a 404 to the original URL.
  24. thanks @Robin S for going deep on this; yeah, i'll have to head over to GH and inquire...
×
×
  • Create New...