Jump to content

Jim Bailie

Members
  • Posts

    81
  • Joined

Posts posted by Jim Bailie

  1. 45 minutes ago, wbmnfktr said:

    Some would say there are a lot of unnecessary steps in this process and they could be right, but I prefer to test projects early on and hate to look at Figma files or Illustrator screenshots.

    @wbmnfktr Amen to that! I think I like your approach here.

    I also think I may experiment with using Astro as the application and making PW available for build time data retrieval via 127.0.0.1:port# and the same PW instance available via a subdomain for post-page load endpoint requests and other tasks if needed. 

    For reference, there are a few articles discussing this sort of approach using Wordpress headless.

    • Like 1
  2. On 3/19/2025 at 3:37 PM, wbmnfktr said:

    Whenever I start a new project and need a MVP-like skeleton of it, I go with static content in Markdown/MDX in AstroJS, later on I'll migrate to 100% ProcessWire in most cases.

    @wbmnfktr I've been looking at AstroJS lately and am intrigued by your comment above.

    How are exactly are you using Astro? Are you using it as sort of a template engine, then moving the final output into a PW instance?

    Or are you using Astro as an application itself and talking to PW via endpoints? If this is the case how are you positioning both Astro and PW on the same server?

  3. Hello - Just installed @kongondo 's terrific module.

    The admin dashboard is looking a little sloppy. There's no grid for the posts, etc. Just wondering if I'm missing something obvious before digging.

    Looks like all the assets are loading correctly. I'm also using the latest PW release 244

    Thanks!

    screen-shot-pw-admin-blogpost.jpg

  4. Ha! I could tell my users to do that, but unfortunately they would not respond positively. The reason I'm interested in this thread is that I will soon need to:

    • Clone a page (same template)
    • Retain some field values
    • Remove remaining values
    • Populate 2 field values based on certain conditions
    • Position the clone in the page tree based on said conditions

    I think just somehow iterating through the KNOWN field names/values and doing the work is the way to go, but it's always good to hear about any efficiencies that others my be aware of.

  5. Alright, I just looked at what I did to address this and it looks like I just renamed the two files to ProcessLogin.js.bk and ProcessLogin.min.js.bk

    This is, of course, not an elegant solution but it did solve the problem very quickly. I do recall now that I need to go into the server and see how the system time is setup relative to any php/pw settings that may be causing this problem systemically.

  6. I was dealing with this very recently. Below is a link to another thread regarding this. I also made an additional change to the JS file mentioned below, but I don't have access to this code today. Can post tomorrow. This seems like it started happening after US daylight savings last hit...

     

    • Like 2
  7. For 20+ years I've always maintained a Windows box and a Linux box connected via a KVM switch and with a dual monitor setup. I also have a somewhat older Intel IMac I keep for various tasks.

    I haven't given it much thought as I regularly switch between Linux and Win10 throughout the day.

    As far as distros go, I'm using Ubuntu 20.04 KDE and will probably upgrade (clean install) after summer sometime. My $0.02...

    • Like 3
  8. Some first steps:

    Have you gotten a working PW instance installed and running in a dev environment?

    Once that's done, install Ryan's "Skyscrapers" site profile and study that. Maybe add some features or use it to setup an instance for a personal project.

    And of course, there's PW community which is very helpful.

    • Like 5
  9. FWIW -- I have a template called "downloads".

    When someone goes to https://example.com/downloads/specialfilename.php, the file name is treated as a url segment. From the url segment, I will essentially:

    • Search for the file
    • Make sure it's there
    • Then deliver it via the mime process
    // Get page ($p) where the file lives
    
    // Still here, so lets see if we can get the actual file
    $file = $p->filesManager->getFile($fileNameSanitized);
    if(!$file) return 'File not found(3)';
    
    header("Content-Type: application/pdf");
    header("Content-Disposition: inline; filename=$fileName");
    header("Content-Transfer-Encoding: binary");
    header("Accept-Ranges: bytes");
    @readfile($file->filename);
    return true;

     

    • Like 2
  10. Thanks. Ok, this is a closed application and there's a 404 redirect in config.php set to go to a page/template with active access control.

    Therefore if I add a url segment to a protected page/template, it will get 404 redirected to a page/template that should redirect to a login page if there is no active session, but that protected page is rendered instead.

    I hope this makes sense. It's not the end of the world as I will need to do some checking in the code, but it is unexpected behavior.

  11. @elabx Thanks, yes. On other pages, I believe this is now interfering with a SAML check/authentication process as well.

     

    $config->prependTemplateFile = '_init.php';
    
    /**
     * Append template file
     *
     * PHP file in /site/templates/ that will be loaded after each page's template file.
     * Example: _main.php
     *
     * @var string
     *
     */
    $config->useMarkupRegions = true;
    $config->appendTemplateFile = '_main.php';

     

  12. Hello - My _init.php file is running twice and it's become urgent.

    The screenshot below is on the home page of a simple echo 'In Init'. There is nothing fancy going on on the home page that could lead to any path of inquiry. (See thread below AND the github issue referenced therein)

    Therefore, this is leading me to thing that it has something to do with regions perhaps.

    // _main.php
    <div id="main-content">
      <footer>Footer content</footer>
    </div>
    
    // template: home.php
    <div pw-prepend="main-content" class="min-h-full flex flex-col justify-center items-center bg-gray-200">
      Some content
    </div>

    screen-shot-ininit.jpg

×
×
  • Create New...