Jump to content

wbmnfktr

Members
  • Posts

    1,873
  • Joined

  • Last visited

  • Days Won

    44

Posts posted by wbmnfktr

  1. Quoting myself:

    1. Customized templates and fields
      Each and every content type only has the fields it really needs.
      Books, companies, recipes - it doesn't matter what kind of data my clients or I have to deal with. The templates and fields will reflect that. Therefore clients don't even have to learn anything in regards to creating or editing data. Super easy.
       
    2. It's typesafe (by my definition)
      We can discuss the meaning of 'typesafe' here but... I think ProcessWire is somewhat typesafe because I define each field, template, relationship, and almost everything else. I know where to expect what kind of data and know what data is allowed in which field. No guessing, no errors. (Sure this depends on your setup and your will to invest some time.)
       
    3. Works perfectly fine for non-developers
      I won't call myself a coder or programmer - I just tinker around with code and have fun. When I started using ProcessWire, getting around was super easy, and learning the fundamentals took only a day or two. From there on, it was easy-going. It's impressive what you can achieve with only some if/foreach/echo in PHP/ProcessWire. I said it a few years back and still stand behind it: ProcessWire seems to be the easiest way to learn and work with PHP.
       
    4. Low maintenance
      There are ProcessWire projects of mine that haven't been updated in the last 5+ years and still work without any PHP or security issues. The moment a project is finished and works without flaws it will do so for a very long time. There is no real need to update a project.
       
    5. Small footprint, high performance
      A ProcessWire website doesn't need that much of a big hosting package. The moment you start using Core cache functionalities or even ProCache most websites are fine and ready for an average amount of traffic. Maybe not ready for a slashdot/reddit/ProductHunt-peak but that's a totally different story. I can get so much out of ProcessWire compared to WordPress (and others I used/tested in the past).
       
    6. ZIP downloads and no real need for a package manager
      What I really love and enjoy is that you can get everything as a ZIP file, unpack those, move them around and do whatever you want or need with them. Not needing NPM or composer to get started - like in the good old days - is just perfect. In the last 1-2 years I did a lot with NPM due to 11ty and Astro, yet an old-school ZIP file has its very own charme. For comparison: Installing CraftCMS feels good and really nice, yet I absolute don't know what's happening, what is needed, and so on. It's like a blackbox. It works but I don't know why. I hate that.

     

    see thread here:

     

    • Like 4
  2. Create (not copy/clone the existing one) a new image field with the exact same settings and try if it still doesn't work.

    I guess you already tried different images? Just in case. 😂
    Does the file really exist in the file system? Correct mime-type?

    Just check if there is some weird setting in the body field. Maybe even create a new body field.
    Are there any textformatters applied?

    Is there anything in the logs?

    As you see... just wild guesses but that's how would look for issues and you already tested quite a lot.

     

    • Thanks 1
  3. 9 minutes ago, TomPich said:

    This project has no profit objectives. They want to raise funds by donations and crowdfunding for the website.

    That sounds to me like a totally different project now.

    This way you could offer a solution that's managed. In other words: the frontend lists all offers/ads, categories, filters, and everything you need. When it comes to posting ads they could all be collected by a more or less simple form (FormBuilder would work perfectly well here). In case of shelters that have a whole lot of animals they want to list, they could send a CSV (or Excel that needs to be converted) and you or someone imports it via ImportPagesCSV. Even references to that animal shelter profile could be set and other things of course.

    The inital cost would way lower, the project could grow and it would only be necessary to build what is really needed, and you could offer to manage that site for a monthly fee.

    Start with a minmal solution and go from there. We did this with a restaurant directory completely managed, no registration needed.

    But that's just my thought before my first coffee. 😂

    • Like 1
  4. My biggest issue with this - in terms of coding and stitching everything together - would be registration, user management, page creation through registered users, and keeping everything as easy and clean as possible for the users. They need custom interfaces and can't use the ProcessWire backend. They probably wouldn't get it.

    Second issue would probably be an additional management tool for all ads, users, and tasks that occur on a day to day base for such websites aka things user need help with. Maybe a bit of GDPR to allow users to totally delete their account and all their ads while keeping everything that might need to be archived by law.

    You didn't mention any form of payment process so things should be quite straightforward from here.

    For the frontend I'd go with clean PHP, clever site structure, and logic. Search, sort, filter with any kind of JS is nice, but not necessary.
    Later on I might add some nice and shiny AJAX-powered search bars, and things like that.

    BUT... all of the above isn't the problem with such projects.

    What you really need is a clear and precise description of what the client thinks he wants, written agreements about who delivers which part and who is responsible for what.

    Was asked to create a job board once.
    Client said: "Super easy. User creates an account. Adds job postings. List them on the website. Remove them after 30 days. Nothing special!"

    What he really wanted was a rebuild of monster or stepstone of one of those big job portals. So... yeah.

    How long would it take? At least 30k EUR.

    • Like 2
  5. In case you have time this weekend:

    • Saturday: enjoy a day reading the docs and tutorials
    • Sunday: enjoy a day of tinkering with the installation, a site profile, maybe first steps

    In addition to that I recommend this 10 year old video:

    ProcessWire looks way different nowadays but the steps are the same. And you can see how easy it is (or can be) to get started.

    • Like 2
  6. Could be because $page->isNew() doesn't match the page as a page is only new right after it was created. So... the moment you publish that page it is already old.

    $wire->addHookAfter("Pages::saveReady(template=basic-page)", function ($event) {
    
      $page = $event->arguments(0);
      $pages = $event->object;
    
      if ($page->isNew()) {
        wire()->log->save("debug", "page is new");
      } else {
        wire()->log->save("debug", "page is NOT new");
      }
    });
    
    $this->addHookAfter('Pages::published', function (HookEvent $event) {
    
      $pages = $event->object;
      $page = $event->arguments(0);
    
      // add conditionals here
    
      wire()->log->save("debug", "page was published");
    });

    Second example uses this hook: Pages::published

    • Like 1
    • Thanks 1
  7. I quote myself here (source)

    Quote

    Works perfectly fine for non-developers
    I won't call myself a coder or programmer - I just tinker around with code and have fun. When I started using ProcessWire, getting around was super easy, and learning the fundamentals took only a day or two. From there on, it was easy-going. It's impressive what you can achieve with only some if/foreach/echo in PHP/ProcessWire. I said it a few years back and still stand behind it: ProcessWire seems to be the easiest way to learn and work with PHP.

    Probably the best way to start is:

    The moment you installed and broke your 10-20th installation of ProcessWire you will feel at home. And you should break* as many installations as possible to learn the foundation of pages, templates, fields, and go from there.

    Use DDEV (all platforms) or Laragon (Windows) for an easy start. Best way to start with ProcessWire locally. Install the Skyscraper profile and take it apart - or try another site profile. That way you will learn how to use profiles and can build a routine to install ProcessWire. Maybe even creating a few instances with different profiles could help.

    * have fun with the code, bend and twist every single part of everything to understand.

     

    6 hours ago, dan222 said:

    What would be the advantage be in learning Processwire over something like Laravel?

    ProcessWire will give you a headstart, great UI to enter content, manage the site and modules, ProcessWire takes care of routing, permissions, and user management. ProcessWire is probably the easiest way to start learning a bit about PHP.

    if/else/foreach/echo is everything you need to know to start.

    • Like 5
  8. Another thing, another thought.

     

    An exported site profile should contain all necessary files to install and run that profile. Right?

    If so, what about necessary files like .editorconfig, package.json, .prettierrc, composer.json, and others?

    Do you guys copy all those files manually over after exporting the site profile?

    Or do you see the exported site profile more like a final product in which those files aren't necessary anymore? (Wouldn't work out because the /vendor folder is missing in the export folder/ZIP as well - in my case.)

  9. I was just playing around with your module and wanted to export my playground profile so I can use it in another PW instance and then this happened:

    Spoiler

    Dangit… Fatal Error: Uncaught TypeError: FormBuilderHtmx::renderAjaxResponseMarkup(): Argument #2 ($submitKey) must be of type string, null given, called in site/modules/FormBuilderHtmx/FormBuilderHtmx.module.php on line 68 and defined in site/modules/FormBuilderHtmx/FormBuilderHtmx.module.php:117

    #0 site/modules/FormBuilderHtmx/FormBuilderHtmx.module.php(68): FormBuilderHtmx->renderAjaxResponseMarkup('InputfieldForm2', NULL, '<!DOCTYPE html>...')
    #1 wire/core/WireHooks.php (1085): FormBuilderHtmx->{closure}(Object(HookEvent))
    #2 wire/core/Wire.php (484): WireHooks->runHooks(Object(Page), 'render', Array)
    #3 wire/modules/Process/ProcessPageView.module (184): Wire->__call('render', Array)
    #4 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage(Object(Page), Object(PagesRequest))
    #5 wire/core/Wire.php (416): ProcessPageView->___execute(true)
    #6 wire/core/WireHooks.php (968): Wire->_callMethod('___execute', Array)
    #7 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessPageView), 'execute', Array)
    #8 index.php (55): Wire->__call('execute', Array)
    #9 {main}
    thrown (line 117 of site/modules/FormBuilderHtmx/FormBuilderHtmx.module.php)

    This error message was shown because: you are logged in as a Superuser. Error has been logged.

    Tried to export everything with ProcessExportProfile in it's latest version on ProcessWire 3.0.238.

    • Thanks 1
  10. On 4/30/2024 at 10:06 PM, jploch said:

    If I keep default utf8 settings, I can install the utf8mb4 formatted site, but the fields containing emoticons are empty. 

    Same here. In that case adding $config->dbCharset = 'utf8mb4' manually fixes the issue for future emojis.

    On 5/2/2024 at 10:27 AM, jploch said:

    I created an issue on Github for this.

    Awesome. Thank you.

    • Like 1
  11. Can someone confirm issues when importing a profile with utf8mb4?

    My case:

    I exportet my latest site-profile yesterday and tried to install it in a new project today and it got terribly wrong. I could fix and finish the installation by installing everything with just utf8 and later changing the config to uft8mb4.

    I looked into the export and while the db dump clearly shows utf8mb4 it's not saying anything about it in the config.php - which could be totally fine. Yet trying to install it fails.

    Here a short excerpt from the install log which was over 600 lines in total:

    Spoiler

    Profile Import

    SQLSTATE[42000]: Syntax error or access violation: 1115 Unknown character set: 'utf8mb4mb4'
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.field_email' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.field_permissions' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.field_roles' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.fieldgroups_fields' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.fields' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.field_admin_theme' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.field_blocks' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.field_process' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.field_title' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.fieldgroups' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.modules' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.pages' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.pages_parents' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.templates' doesn't exist

    Imported: ./site/install/files => ./site/assets/files/
    Created directory: ./site/assets/cache/
    Created directory: ./site/assets/logs/
    Created directory: ./site/assets/backups/
    Created directory: ./site/assets/sessions/
    Imported: ./site-blank/modules/ => ./site/modules/

    You might notice this weird utf8mb4mb4 in the second line.
    And I guess that's the issue here but I can't find it in any of my exports.

    Versions used:
    ProcessWire 3.0.238
    Export Site Profile 5.0.1

  12. In case you ever run into a Secure Connection Failed / PR_END_OF_FILE_ERROR issue with DDEV, doublecheck you don't have any VPN connections actively running somewhere.

    Doing this first can safe you at least an hour or two. 🤦‍♂️

     

    Spoiler

    Secure Connection Failed

    An error occurred during a connection to ssw.ddev.site. PR_END_OF_FILE_ERROR

    Error code: PR_END_OF_FILE_ERROR

    • The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    • Please contact the website owners to inform them of this problem.

    ddev.png.de4ca05ecc6ff4d76ad3522b233751dd.png

    • Like 1
×
×
  • Create New...