Jump to content

tinacious

Members
  • Posts

    87
  • Joined

  • Last visited

1 Follower

Contact Methods

  • Website URL
    https://tinaciousdesign.com

Profile Information

  • Gender
    Female
  • Location
    Vancouver, BC, Canada
  • Interests
    💪 ProcessWire!
    🎨 Web and App design
    👩🏻‍💻 Full stack software development

Recent Profile Visitors

7,058 profile views

tinacious's Achievements

Full Member

Full Member (4/6)

58

Reputation

  1. Hey @BrendonKozand @poljpocket, I just wanted to update that I have used ddev based on your suggestions and scripts and it's great. Thanks again for sharing that info and those configurations. I had been using MAMP pro (trial) but when the trial expired, the free version didn't work for some reason. I gave ddev a try with MariaDB, and it worked great. Thank you both for that suggestion. I didn't get to test Lightspeed but I think it'll probably be fine. 🤞 Thanks again!
  2. Nice @poljpocket! I've starred it and will keep this in mind. Where's the image referenced here: https://github.com/poljpocket/processwire-docker/blob/19e801318605bfabb81e262baa9ddb3d10ef2afd/docker-compose.yml#L5 (I'm guessing wherever that code is is where the Apache stuff is configured?) Thanks! Edit: I saw it's in your 2nd link: https://github.com/poljpocket/processwire-docker-image/blob/main/scripts/install.sh I'll take a look 👀
  3. Thanks @BrendonKoz, I did already see the LiteSpeed WordPress setup you linked, which appeared to be for the enterprise version. Assuming a paid license would've been required, I tried OpenLiteSpeed one instead. I'm not sure if you looked at the template at all but there's a lot going on there. I did give it a try, it generated lots of conf files in a new lsws directory, and I ran into some errors trying to modify the Docker compose file—it would be far too time-consuming to do it this way, and if I'm going to go to that level, I may as well configure a VPS since changing a Docker configuration is doing that plus containerizing it. DDEV sounds appealing but upon closer inspection, this supports MariaDB but does not have documentation for LiteSpeed so unless it's an undocumented feature, this isn't a suitable suggestion. Did you see support for LiteSpeed somewhere? Feel free to link it, because I did not. My question was specifically about dev environments for spinning up LiteSpeed with MariaDB to ensure compatibility with the client's infrastructure.
  4. Thanks @da² and @Jonathan Lahijani for your answers. Yeah, I agree that it seems from what I've read it should just work, I just like to test to be sure and was hoping to do it locally, but maybe it's unnecessary. I have VirtualBox on my Mac but haven't worked with it directly, just via Vagrant and Genymotion (Android emulators). I could see about getting Debian or Ubuntu running in that. Or alternatively, I could just use DigitalOcean since I'm very familiar with them and have used them for several ProcessWire sites in the past (I even wrote this old article for them ~10 years ago: https://www.digitalocean.com/community/tutorials/how-to-install-processwire-on-an-ubuntu-vps) – I suppose setting up LiteSpeed and MariaDB won't be much different, I was just hoping there was a quicker way than provisioning a Linux box myself, e.g. a Docker compose file that maybe works out of the box. Thanks everyone, I appreciate the quick responses!
  5. Hello! I have a client who's been very happy with their ProcessWire site over the years and I'm doing some updates and core upgrades. I upgraded it from 2.4 to 2.7 then to 3.0 (specifically ProcessWire 3.0.229). Everything seems to be running fine so far. My local dev environment is a standard LAMP stack with MAMP on macOS. The client is moving to different infrastructure and requires support for LiteSpeed and MariaDB instead of Apache and MySQL. My understanding is that these are compatible "drop-in replacements" for Apache and MySQL though I personally have used neither. I was wondering if there were any recommended tools that would allow me to test this environment locally for a sanity check to ensure everything will be ok once I pass the project off to the internal IT team. I'd love to be able to see this running locally with this setup. In the past I've used Vagrant and a version of ScotchBox (archived project) that I modified to support ProcessWire. This was a long time ago so I'm open to something else. Has anyone had any issues with moving a ProcessWire 3.0 install to LiteSpeed and MariaDB from Apache/MySQL? Thanks for your help!
  6. Hi @Robin S thanks for your help. I've dumbed down the example since my initial example was difficult to understand. I'd actually be adding the Page Reference to a field on a repeater field on the city template. The city example may be a bit simple to illustrate what I'm trying to do. I am trying to build dependencies with a legal document which has content types Article, Section, and ConfigurableField. Article (page) Section (page, child of either Article or Section to support infinite nesting of Section types) ConfigurableField (repeater) This has properties that can be configurable, e.g. Field Name = short text Field type = enum Dependencies (Page Reference) This is the field I'd like to say "get me any other ConfigurableField provided that it's in the same Article" In the first screenshot is the field type used for my dependencies field. It is of Input field type = Checkboxes. In the second screenshot is the selector and template configuration. Currently I'm selecting any other repeater_configurable_field but I need to scope it to those only under the same Article (article.php). Other than Home, Article is the root. Would your suggestion work in this case? Update: I have tried your suggestion where I reference the configurable field, e.g. template=configurable_field, has_parent=page.rootParent That doesn't work but I can link to a section: template=section, has_parent=page.rootParent My guess that this isn't working is because, even though repeaters have a page-related API, they aren't surfaced as pages consistently in the API. For example, they are only surfaced when using the Page Reference of Input type Checkbox, and are not for the ASM Selector or other page selector types. And it seems that there may not be support for querying for it amongst pages. I know I can access the repeaters in code, so I'm wondering if next I need to try a custom PHP-based selector rather than using a selector string. Update: I have also tried the PHP-based one and with the selector string suggested, though that selector string works for sections and in the UI, it doesn't work in ready.php with the same selector string: // Doesn't work even though this selector string works in the UI $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->hasField == 'dependencies') { $event->return = $event->pages->find('template=section, has_parent=page.rootParent'); } }); // Doesn't work either but if the first one doesn't work, I wasn't expecting this one to work. $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->hasField == 'dependencies') { $event->return = $event->pages->find('template=repeater_configurable_field, has_parent=page.rootParent'); } });
  7. Picture the following hierarchy: Canada British Columbia Vancouver Ontario Toronto Nova Scotia Halifax United States California Los Angeles New York New York City I used the word "page selector" but should've said "page reference." Consider that I am trying to make a page reference for a city, so it has the template type of city, but I want to restrict cities to cities within the same country. For example, I have a field on the city template that is called "similar city" but I only want to choose cities within the same country. I don't want the user to choose a city in a different country so I need to take the 2 following criteria into account: The template (city.php) The final parent Canada, if I'm trying to choose a Canadian city, or United States if I'm trying to choose an American city. So something like: $currentCountry = currentCity.getCountry(); $allowedCities = currentCountry.getAllCities(); Those allowedCities would be the ones I'd want to include in the Page Reference field. Essentially, I need to make a custom selector that has some knowledge about what the root parent (other than home) is and filter for cities within that parent.
  8. To add some info, I'm wondering if I can use a combination of selector and options: https://processwire.com/api/ref/pages/get/ Essentially, I'm not great with selectors and would love some help! ?
  9. Hello! It's been a while since I've done ProcessWire development, but I'm back (and quite rusty with it, and PHP). Forgive me if these questions have already been answered! I have a field called dependencies that I would like to list a list of other fields. So far, I've been able to accomplish this by using the Input Field Type = Checkboxes and the template of the repeater field. Let's say I have the following hierarchy: Article (page) Section (page) Field (repeater field) title dependencies (PageArray) I have the following data: Commercial (article) Basic terms (section) Parking included? (field in repeater field) Parking spots (field in repeater field) Residential (article) Basic terms (section) Parking included? (field in repeater field) Parking spots (field in repeater field) I am using the page selector to represent a list of dependency fields. Currently, by using Checkboxes, I see all repeater fields in the app. I would like to limit it to all fields within the same parent article. For example, if I have 2 lease documents, they both have a section "Basic terms" and I would like to list "Parking included" as a dependency of "Parking spots." The UI is confusing if I see "Parking included?" twice with the checkbox UI. ASM Select, Page List Select, and Page Auto-complete do not expose repeater fields so I can't use those. So, the solution to my problem could be one of the 2 (or maybe you have a better idea): The ability to expose repeater fields to ASM Select, Page List Select, and Page Auto-complete The ability to make a custom selector to include all repeater fields within the same article (template = article) Thank you in advance for your help! ?
  10. This looks like a huge time-saver. Thanks for this!
  11. Thanks for the reply but that just mangles it further, adding 2 additional mangled characters.
  12. Hello all. Thank you in advance for your help. I am making a bilingual website in French and English using ProcessWire. It's my first time doing a multi-language site. I am storing a date object with ProcessWire in the database using the date field and retrieving it in PHP. I am detecting the language that the user is viewing the site in and then setting the PHP locale like this in a PHP object called $strings: setlocale(LC_ALL, ($is_english ? 'en_US' : 'fr_FR')); Then when I am getting the date, I am doing this: $formatted_date = strftime($strings['date_format'], $page->date); The characters with accents (like décembre) are getting mangled. Am I doing something wrong? I haven't been able to figure it out. When the client adds French characters in the TinyMCE or other fields, they are not mangled, which leads me to believe I may be doing something incorrectly with the above code. Is there an optimal way of retrieving dates in different languages for multi-lingual ProcessWire sites? Thanks!
  13. Hi all. Does anyone have any experience with creating a REST API for ProcessWire? Would this be feasible? I briefly looked into the PHP to JSON library used by the WordPress JSON API plugin. Is that the right approach to take with ProcessWire or would you recommend another approach? Thanks!
  14. Hi all, I've had some issues during the migration process with using a remote database including login and performance issues. I was wondering if there were specific measures to take into account when using a remote database. My first issue is the performance. I noticed that now since I've been using a remote database that the site takes longer to load. Is there anything I can do to improve the site performance like cache the database or anything? Everything is very slow, especially in the admin pages when loading the pages list, editing an item, etc. My other issue was not being able to log in to the site. I would get the "Login failed" error and sometimes "This request was aborted because it appears to be forged." I have tried a number of suggestions I've found on the forums including making sure my assets folder has permissions 777, deleting the contents of /assets/sessions/, changing the session name to $config->sessionName = session_name(); or just commenting it out altogether. None of these worked. This was the line in my config.php that worked: $config->protectCSRF = false; With that suggestion also came the disclaimer that it may not be the best approach. I want to use best practices so would like to know what the best way for working with remote databases securely would be? Thanks for your help.
  15. Thanks Adrian, I decided to just use the Google Maps API and the values created by the ProcessWire module to assist in that. I used the visibility: off for the POI and that worked. Thanks.
×
×
  • Create New...