Jump to content

tires

Members
  • Posts

    226
  • Joined

  • Last visited

Posts posted by tires

  1. I miss the toolbar in edit mode!

    Previously, after clicking on "edit", the toolbar was still visible and I could close the edit view again using the "browse" button.
    After saving the page, the edit view is not closed either.

    Processwire: 3.0.210
    Admin-Bar: 2.9.1

  2. It also took me a while to understand drupal.
    In a nutshell: A template is called content type and instead of pages there are nodes. These nodes can be transformed into a page structure via a navigation module.

    The templating is also somewhat difficult and the structures are predefined.

    The advantage is probabely that the editor can create many things in the backend himself (e.g. with the views module). However, it is anything but intuitive or easy to understand and learn.

    • Like 2
  3. I have created 4 larger wesites with drupal 7 before I got to know processwire. The modules and the community are great with drupal. But in the end I found it extremely annoying and frustrating.  It was no fun and the projects often ended up taking much longer than expected. I can't say how it is with the newer versions ...

    If you want to have clean code the templating is quite complex. It seemed to me that the Drupal way was rather to take the very complex code as it is output (with nested elements and classes) and then just customize or hide elements in CSS.

    The module "views" (perhaps the most popular in drupal) is quite complicated and in the end limited in its possibilities. What is complicated to click together in "views" can often be done in processwire with pages->find in one line!

    What I also found annoying was that, depending on the modules used, the backend no longer looked very uniform. This is much better in processwire.

    If I have to make adjustments to the websites today, it takes me a while to think my way back into the structure and understand which module creates which content in which place.

    I am really happy to have found processwire and will certainly not be using drupal for another website.

    • Like 4
  4. Big thanks to all of you!

    I simply used the $page->delete() in a template file like this:

    // Find old pages
    $pages = $pages->find("template=mytemplate, parent=myparent, sort=date, limit=50000");
    
    // Delete old pages
    foreach ($pages as $page){
    	$page->delete(); 
    };

     

    • Like 1
  5. Hi!

    How can i best delete older pages via the console or directly in the database.
    There are several thousand pages so it is not possible to do it manually.
    I would like to delete all pages before a certain date or those that are older than a year, for example.

    Thanks!

  6. Hi!

    I would like to output the datetime field in the email in a different format. unfortunately i can't set that in the field setting.

    The output format is: "2021-12-01 00:00"
    What i need is: "01.12.2021" ... and without the Time

    Is there a way to make this work?

    Version: 0.5.1

  7. I would like to update a website to php8 that was previously running on 5.4.

    Unfortunately I'm having problems with several modules like MarkupSEO and AllInOneMinify that haven't been updated in a long time and don't seem to work with PHP8.
    Even in PHP7.4 some errors are thrown out.

    I'm afraid this is a general problem with the modules on older websites, isn't it?
    Or a general problem of a cms with less popularity?
    How do you deal with this?

  8. 6 hours ago, Guy Incognito said:

    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.

    Thanks for the info!

    Is there a quick workarcoud to fix it on my own.
    Or do i need to downgrade to an older php?

     

    ----------------------------------------------------

    For now i just hide the error / warnings with this code in my site/config.php

    /** OWN ERROR HANDLER FOR DEPRECATION NOTES **********************************************/
    
        function myLocalDevDeprecationErrorHandler($errno, $errstr, $errfile, $errline) {
            if(!isset($GLOBALS['DEPRECATION_WARNINGS_BAG'])) {
                $GLOBALS['DEPRECATION_WARNINGS_BAG'] = [];
            }
            if(!is_array($GLOBALS['DEPRECATION_WARNINGS_BAG'])) {
                $GLOBALS['DEPRECATION_WARNINGS_BAG'] = [];
            }
            $GLOBALS['DEPRECATION_WARNINGS_BAG'][] = [$errfile, $errline, $errstr];
            return true; // true | false  = suppress further processing
        }
    
    /** OWN ERROR HANDLER FOR DEPRECATION NOTES **********************************************/

    See here:


     

  9. Under PHP 8.1 i got this error message:

    Warning: Undefined array key "canonical" in .../site/assets/cache/FileCompiler/site/modules/MarkupSEO/MarkupSEO.module on line 357
    
    Warning: Undefined array key "custom" in .../site/assets/cache/FileCompiler/site/modules/MarkupSEO/MarkupSEO.module on line 401
    
    Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in .../site/assets/cache/FileCompiler/site/modules/MarkupSEO/MarkupSEO.module on line 580
    
    Warning: Undefined array key "canonical" in .../site/assets/cache/FileCompiler/site/modules/MarkupSEO/MarkupSEO.module on line 357

    Is there an updated version?

  10. Now I run into another problem.

    I would like to use the redirect in a website where i use the login/register module.

    According to my devtools in firefox the initially URL (https://mysite.com/article/name-of-my-article/) is redirected to the frontend login form (https://mysite.com/) with a 301.

    I have no idea how to write the hook to grab the URL and set the cookie.
    In this hook i don't work:
    $this->addHookBefore('ProcessLogin::buildLoginForm', function(HookEvent $event) ...

  11. 13 hours ago, Robin S said:

    When you use this approach you don't need a different URL to the regular one. If a non-logged-in visitor tries to view a page that you must be logged in to view then they get redirected to your custom login form and the ID of the page they tried to view is preserved in a GET variable (you could use a URL segment to hold the ID instead of a GET variable but I can't see a reason why that would be preferable).

     

    You are absolutely right!
    But the GET variable is not absolutely necessary if i understand it right.

    21 hours ago, tires said:

    I thought it would be useful to use the processwire functions (i.e. segments)

    Is there any way to get the last part of the URL via segments instead of this wild explode('/' ...
    Or can i not use segments in this context?

×
×
  • Create New...