Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by JayGee

  1. Yes this is what I was doing... but turns out I had a typo and it was loading my 404 page in the panel I think. This is why I was getting the nav bar showing πŸ™ˆ. The panels now work exactly as expected (and as you describe) to load my module functionality! πŸ₯³
  2. Sorry to be clearer on my question - what I'm wondering is whether there's a core method for injecting dynamic content to PW panels and modals in the dashboard rather than writing new logic. I know you can load a page into the panels, however that then seems to reload the whole dashboard interface including nav etc inside the frame.
  3. Hi all, I'm looking for some examples/guidance/tutorials on how to populate a PW panel from a module. I know you can open a UIKit panel with a .pw-panel css class and that you can populate it with a custom admin page. But I'm wondering the best approach to populating with dynamic module-specific content, e.g. a form? TIA J
  4. I think some of the confusion arises around mixing terms for bootstrapping and multi-instance. Unless I'm mistaken, I've always taken multi-instance to mean a multi-site scenario. I.e. multiple sites running off one core or database (or various combinations of this). Whereas bootstrapping allows one codebase to interact (including page creation) with the API of 2 disparate ProcessWire installations without needing to create your own custom endpoints. But as @Robin S has highlighted above I'm pretty sure I've been able to write ok to bootstrapped PW instances, although it has been a while since I've done it so would need to test to be sure.
  5. Cool - interesting insight thanks just to see what others are doing. You could also try the bootstrapping method which I think would allow you write between sites too through the regular PW API. https://processwire.com/docs/front-end/include/
  6. Purely out of curiosity can I ask the nature of your project you need this for? We’ve done a few app projects where we’ve considered separation of concerns over multiple PW instances but have never ultimately thought it would be beneficial versus just running 1 site.
  7. I completely missed your thread on this when searching this issue - some helpful stuff there thanks.
  8. Ahhhh thank you - penny drops, aha moment! 🀣 This works - the template-specific classes need to extend DefaultPage and not Page... painfully obvious with hindsight that it should follow usual inheritance rules. I'm not 100% sure it's clear from the docs though, I think I was expecting some kind of PW magic to kick in and inject the DefaultPage methods. Either way I know now and this awesome PW feature becomes even more useful. Thanks all. πŸ₯³ Edit: I now also realise this is exactly what @Charming Troll's reply was demonstrating. - thanks.
  9. Hi all, sorry for the delay I was away for a few days and thanks for the responses so far. So the contents of the class file (DefaultPage.php) are as follows: class DefaultPage extends Page { public function test() { return 'test'; } } My understanding (maybe wrongly) is that in this scenario $page->test() should then be callable in any template? However I get a method is not callable in this context error. Yes this is enabled. Testing this in a fresh download of latest production PW where is enabled by default. (Other template specific classes and methods work too - e.g. /classes/HomePage.php). Other background info is that I'm using markup regions - I don't know if that could make any difference? Thanks, J
  10. Have been loving working with the custom page classes feature since it was added, but haven't yet figured out if there's meant to be a built in way to add a class in /site/classes that will add methods for every template rather than for a single template type. I thought initially you could add a function to /site/classes/DefaultPage.php and call it as $page->yourCustomMethod() within any template but this doesn't seem to work - is it meant to?
  11. Hey - I know how you feel, work is busy here too! I think you're right about the readme, I will update thank you. πŸ™‚
  12. Hey @Cybermano πŸ‘‹ ... remember me! 🀣 Sorry had a crazy few weeks at work and then a holiday, but finally got around to reviewing your great contributions on this module. I tested it and everything looks great. I merged your changes and also combined our readme files and added a thanks note/credit for you too πŸ™‚ Thanks again - you've taken this module way beyond where I originally planned. Only comment is I noticed when you first install it, the module will error on the front end because no languages are selected. I guess this is obvious when you think about it, but wonder if we should make that a compulsory field or pre-populate with at least one language? Thanks J (Finally changed my name on here too lol)
  13. Hi @Cybermano - just to let you know I've seen your continued hard work on this module πŸ₯³ which is awesome! I'm pretty sure it's all a million times better than my implementation but I've been so busy at work last few weeks I've not had a chance to review it all. I'll make sure I'm onto it this weekend and merge it all in. P.s. as you can see from my GH my real name isn't Guy (it was an obscure Simpsons reference)... I might change my name on here as it feels really silly otherwise 🀣🀣
  14. @Cybermano πŸ‘‹ - thanks for the PR on this module. Will check this out over the next few days πŸ™‚
  15. Ah ok - I didn't clock the PHP 8.0 requirement apologies. I just installed on auto pilot without thinking as have used your module before πŸ™‚. It's odd though as I thought that operator had been supported pre 8. It wasn't a fresh PW install it was an existing project. I don't recall seeing the warning about PHP version, but Tracy Debugger intercepted the syntax error when I refreshed the modules, so I didn't see the default PW messaging. But all running smoothly now anyway thanks.
  16. @bernhard went to install RockMigrations to a new project today and the install fell over at line 2564 of RockMigrations.module.php on PHP 7.4. Seems like 7.4 didn't like the Elvis operator for some reason. Version bump to PHP 8 resolved it - but thought you might want to know for backward compatibility.
  17. I've not actually checked the errors myself yet but I guess if you can supress them without issue for the time being that's going to get you out of jail until there's a fix. πŸ™‚
  18. Hi @tires We're actually doing a little bit of work on this module to fix some issues we noticed with the upgrade path from sites running the old/original version to the more recent branch @adrian started. We'll test latest PHP at the same time and see if we can fix.
  19. Ah this may be what I was thinking of thank you. Not quite right for what we were trying to do but good to solve the mystery!
  20. Thanks @bernhard - that's a simple way of doing it thanks. Could have sworn I saw a module for organising pages in folders.
  21. I've seen previously on here somebody had a module or method to organise pages in the site tree visually into folders, whilst still keeping the root path for the page. Now I need it for something I can't find it! E.g. Instead of: Home -- /Page1 --/Page2 --/Page3 I would like to organise as follows: Home --/folder -- /Page1 --/Page2 --/Page3 whilst still keeping the URL as {site}.com/Page1 not {site}.com/folder/Page1 We're migrating a site from WP with significant number of pages with a URL structure that currently runs off of the root for every page URL and I'm trying to avoid a tangled mess of rewrites and htaccess edits! TIA, J
  22. Came to get an ETA on TinyMCE frontend editing compatibility and found you've already pushed it! Amazing work as usual @ryan πŸ₯³
  23. Definitely sounds like they would be better off with a proper API to make for a shorter round-trip - but I know it can be hard sometimes to get people to change their ways! πŸ˜†
  24. We have this kind of setup on integrations for a number of clients. It's a bit old fashioned and clunky but still seems to persist as a common way of working particularly in certain industries, e.g. fulfilment and ecommerce price lists. We have mainly used a couple of approaches. 1) Creating cloud based endpoints to which files can be sent with cloud functions (E.g. Google cloud) sitting behind them. So the relevant processing is triggered automatically when the data arrives to the endpoint. Not quite a full API but not traditional FTP either. 2) Time-based send-and-receive using SFTP and CRON tasks to trigger the processing by regularly checking for files in certain folders on the FTP servers. The biggest challenges we find are more about process and safeguarding the quality of data exchange rather than technical issues. E.g. should files be overwritten on arrival at the FTP sever? What is the naming convention for the files? What is the protocol for handling missing or overlapping data - e.g. if 2 files have a row with the same ID number should data be overwritten in your database? How are people notified if data exchange fails or there is a file parse error?
  25. It's important that this is the case too because otherwise you could potentially be informing search engines you are using a different primary domain to one your site it actually using.
  • Create New...