Jump to content

JayGee

Members
  • Posts

    278
  • Joined

  • Last visited

Everything posted by JayGee

  1. I had a typo - missed a '/' off the end of my fields path ? I'll see myself out ?
  2. I'm in the process using PW multisite configuration to centralise a family of sites that will be identical aside from content. I'm trying to create a shared folder for the main site templates and modules. It's all working fine so far but I can't get ProFields Repeater Matrix to play nice. I have my paths set up as follows in config: $config->paths->templates = $config->paths->root . 'shared/templates/'; $config->urls->templates = $config->urls->root . 'shared/templates/'; $config->paths->fieldTemplates = $config->paths->root . 'shared/templates/fields'; $config->urls->fieldTemplates = $config->urls->root . 'shared/templates/fields'; $config->paths->siteModules = $config->paths->root . 'shared/modules/'; $config->urls->siteModules = $config->urls->root . 'shared/modules/'; But the repeater matrix doesn't seem to be picking up the customer templates located in /shared/templates/fields In the template I have the usual: echo $page->render('page_blocks'); ?> But all I'm getting is a bullet point list of matrix block ID's. It's not rendering using the templates. I can force the path of page->render to use the shared folder ($config->paths->fieldTemplates.'/page_blocks.php), but then it just outputs a blank page - as if it's not finding the sub templates. Any ideas? ?
  3. Super excited about the e-commerce projects hopefully becoming ProcessWire shaped!
  4. And on that basis you can signpost people too. So before you allow free type they might have to indicate an initial route by clicking a button - e.g. Do you want a) Report a problem b) Pay a bill etc etc.... "Now tell us which service you want to pay a bill for"...(free type and match). Might help limit the terms they throw at it.
  5. Update.... not 100% sure I'm not overlooking something simple, but I think this may be a bug and have submitted it on GitHub. https://github.com/processwire/processwire-issues/issues/1468
  6. This is a cool idea. And with a JS frontend onto the PW API it would still have a pretty chatesque UX. Plus using PW operators for the page selectors you could probably fuzzy match free-typed enquiries quite well too.
  7. I'm trying to build a search selector that includes a checkbox multiple option field (clinicdetails_specialisms). The whole selector works fine if I don't include the checkbox field. With it included I get errors like "Error: Exception: SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters (in wire/core/PageFinder.php line 627)". This is the selector as it currently stands. subscription_status=active,(template=user,clinicdetails_description|clinicdetails_short_description|clinicdetails_clinic_name|clinicdetails_first_name|clinicdetails_last_name*=$query),(clinicdetails_specialisms.title=$query) I've also tried setting the specialisms field in one string rather than groups and have also tried with/without the '.title' property. Oddly the selector works if specialisms is the only field being searched. It seems to fail when mixed with other selectors. Can anyone advise what stupid mistake I'm making!
  8. Could you perhaps solve this by populating your page’s open graph (OG) tags with specific URLs rather then letting them auto populate from the actual link and then using URL segments or parameters to differentiate between real/spider visitors. I think by populating OG tags it will tell fb where to pull the thumbnail, description etc from even if the human visitor has to go through the verification gateway first.
  9. We have a client's Processwire site where the Pageimage::size() method has stopped working. It's creating small white PNGs in the assets folder instead of the resized image as usual. Their hosting was recently upgraded and switched to PHP 7.4 and I'm wondering if a they've removed a PHP package or changed a server config to cause this. Does anyone know if the image resizing functionality requires specific PHP modules I need to check for? I've checked the folder permissions on the server - this all looks fine. TIA, J
  10. Also check the source server doesn't hasn't blocked image hotlinking or downloading of images without a referrer. I had an issue with an import script once along these lines.
  11. Yes 100%. I built and run a client-specific CRM/membership system for an arts organisation using Processwire. It started out relatively simple and has grown, but allowed us to build exactly what was needed and cut-out the over-complication of the many off the shelf systems they had already tried. Without PW's baked-in features development of this system would have taken an immeasurable amount of time longer.
  12. Hi @DV-JF - I'm pretty sure I do have both these enabled but I will check thanks. I have found that IP restriction works fine for my requirements though after all - turns out that my server was reporting an IPv6 IP and not the IPv4 I had set in the restrictions. ? So back up and running for now ?
  13. I looked into this further. I tweaked the module to dump out the response from Google API and it confirms that indeed referrer restricted API keys won't work with the Geocode API. Array ( [error_message] => API keys with referer restrictions cannot be used with this API. [results] => Array ( ) [status] => REQUEST_DENIED )
  14. I'm just using this module for the first time in a while and finding similar behaviour (Google Cloud has change a lot since I last used this module). I haven't tested the scenarios as thoroughly as @TheMick however I can confirm that everything works without the API key restriction, however restricting it by IP or Http referrer in GC dashboard generates a 'Error geocoding address' response and the lat/long fields don't populate.
  15. @Robin S Thanks for this - really useful and puts my fears to rest. @gornycreative Thanks also for sharing info. I can't see I'll need anything like 50 of templates (famous last words ?) and TBH what I'm building is should have pretty low demands in terms of resources anyway - for the end user its more of a set-and-forget scenario. So demands should only increase with a significant number of users... but hey that's a good problem to have eh!
  16. Thanks for the detailed response. This basically summarises exactly the choice in front of me... I'm pretty sure I can dramatically reduce the amount of code by using a new template for every view or configurable feature of my app and feeding it into my _main.php. But I'm not sure if creating loads of templates (I would estimate this will end up being around 10 to create the product MVP) is bad idea or particularly inefficient approach in terms of performance and database?
  17. Hi all, Just embarking on a new web app project that I'm planning to use Markup Regions for. I've experimented with Markup regions before and am happy with the syntax and coding but wondering on the overall approach. The project will have a simple user dashboard with various typical web app views for account management, settings etc etc... I'm wondering am I better having one 'dashboard.php' template with PHP routing/conditions/includes to determine the content each page feeds into the _main.php file. Or is it better to have a seperate template for every page in my dashboard? I could end up with quite a lot of templates to realise my final functionality this way and pretty sure I've seen posts that PW is intended to have a vast number of templates. However routing all the views with new code could also get quite complex quite quickly too. Wondering what thoughts/experiences others have had - I hope this questions makes some sense!
  18. Hi @Macrura thanks for this - module looks fantastic and not sure how I managed to pass it by until now! One quick question - can you export settings to other sites? One big advantage of coding modules is obviously the portability.
  19. After reading up further I see I should have built my own UI on a Process page rather than using a module config screen to achieve this. ? I never realised there was such a disconnect between using module config screens and the UI of Process modules. It would be awesome if there was a way to optionally pull module config screen into the Process page view as most of the simple modules I need to make for sites don't need more than what the config screen provides other than granting permissions to non super users. Don't know if anyone has come up against this or created a work-around?
  20. Hi all, Title says it all really. Have created a little site-specific module and want to give a non-superuser access to edit the module settings. What's the best way to go about this. I've added a nav item to the the setup menu using the getModuleInfo() array in the module file but this just returns a 'The process returned no content.' message. Should I be redirecting this the config screen or rendering the config screen into this page somehow? Thanks, J Incidentally the icon I choose for the module isn't rendering - do I just choose the name from FontAwesome for this?
  21. Sorry to necro an old post, but I was searching for a pointer on a PW .htaccess config ( @horst's post above super useful btw thanks). @teppo your reply got me thinking - wouldn't it therefore be useful/better if PW were to auto redirect any invalid host requests back to the first domain in the httpHosts array rather than successfully loading the page for the reasons you've outlined - or maybe it should throw an error? I get that it picks it up in debug mode or when you're logged into dashboard, but maybe not ever showing someone a page using an unlisted host on the frontend would be safer?
  22. Hijacking my own thread here lol... but now I think about it more it would be cool to allow images in the comments but looks likes this might be more complex. Might need to switch to an API/repeater based solution and use a CKeditor text field... unless anyone else has a solution/ideas around the comments field?
  23. Sweet, thanks, works perfectly! I knew there had to be a non-destructive preset in there. You just saved me having to pour through the module classes ?
  24. I've just realised the default form already renders with the current logged in user name and email... so I guess my revised question is can we disable these fields rather than just hide them?
×
×
  • Create New...