Forum Replies Created

Viewing 15 replies - 121 through 135 (of 165 total)
  • Forum: Plugins
    In reply to: [Airpress] Project dead?
    Plugin Author Chester McLaughlin

    (@chetmac)

    Not abandoned, just busy! And the time I have had available for this has been directed towards getting a “demo” website up and running that gives 1) new Airpress users a ready-to-go playground and 2) me an environment where I can create tests for each bit of functionality so that whenever there are code changes to either Airpress or WordPress I can ensure I don’t break anything.

    Plugin Author Chester McLaughlin

    (@chetmac)

    This is a byproduct of some of Airtable’s weirdness… when using formulas, multiple options are just concatenated strings, so you have to do something like:

    FIND("My Tag",{Tags})

    However, if one tag is a subset of another (like ‘mens’ and ‘fishermens’) then you’ll get back both and you’ll need to do an additional filter using PHP.

    Plugin Author Chester McLaughlin

    (@chetmac)

    Great feedback! Thanks for the details. I reproduced the error and found/fixed it. Releasing v1.1.33 now.

    Plugin Author Chester McLaughlin

    (@chetmac)

    I believe the issue was I tried to clean up the debugging output with a call to AirpressCollection->toArray() however that wasn’t always a populated object resulting in a bad error in the admin screen. Update to v1.1.32 and you should be fine. Thanks so much for the prompt feedback. You saved me some egg on my face and some other users some real headaches!!!

    Plugin Author Chester McLaughlin

    (@chetmac)

    v1.1.31 has been released. It limits image caching to 25 seconds at a time. It’s really conservative, but in the long run it’s the safest approach since many hosts will have different max_execution times and methods of implementing. In a future release I’ll make the 25 second limit a filtered variable so that it can be modified. Try this out and see if simply reloading the page successfully works for your huge amount of images. I test with 25 3+ MB images and it took 4 page loads, but it worked with no corrupt images or errors. Here’s hoping!

    Plugin Author Chester McLaughlin

    (@chetmac)

    Perfect. Thanks for the useful feedback!

    Plugin Author Chester McLaughlin

    (@chetmac)

    Ok, I got to the bottom of it and there is no bug.

    If you’re logged into WordPress admin, you’re able to load the “Map to this page” and Airpress will use the “Test URL” to populate it. This is with the intention of testing and using (Cornerstone for now) visual page builders that need a “Test URL” in order to populate data while building.

    If you’re not logged into WordPress admin, you’ll get a 404 when you attempt to directly access the Virtual Post “Map to this page” URL.

    So my advice is to name all your “Map to this page” templates with a prefix of “TEMPLATE” so that the page slug is “template-something” and you’ll understand that you’re not supposed to access it directly.

    If you have a use case for why you would like to directly access the template page (“Map to this page”), let me know—I’d love to hear it!

    Plugin Author Chester McLaughlin

    (@chetmac)

    Ack there is a bug somewhere! I just got different results when I’m NOT logged into WordPress admin vs when I am… I will track it down and get back to you!

    Plugin Author Chester McLaughlin

    (@chetmac)

    The purpose of the “Test URL” is two-fold:

    1. To test the regular expression provided when saving a VirtualPost providing “instant” feedback.
    2. As more “visual editors” are supported, a default (or Test URL) is needed to populate the template page, otherwise shortcodes would have nothing to process or return.

    Regarding your specific example, I believe you want two VirtualPost configurations. One for the “index” or “archive” page (/folder/subfolder/) and one for the item or “post” page (/folder/subfolder/something/).

    Airpress VirtualPosts aren’t intended to be able to serve both the “archive” and the “post” pages with a single configuration as the URL pattern is different.

    So your first VirtualPost config should be:
    Pattern: ^folder/subfolder/?$
    filterByFormula: NOT({Name}=BLANK())
    … the filterByFormula in this case needs to return ALL the records you’re looking to list in your index/archive page

    And your second VirtualPost config should be
    Pattern: ^folder/subfolder/([^/]+)/?$
    filterByFormula: {some field}=”$1″

    I’m curious, with your specific example (a single VirtualPost config of ^folder/subfolder/(.*)/?), what did you expect to see (or want to see) when you visited /folder/subfolder/ ?

    Plugin Author Chester McLaughlin

    (@chetmac)

    If you’re willing, I would love to see your code sample so I can see why that works and the other options don’t.

    Forum: Plugins
    In reply to: [Airpress] nested loops?
    Plugin Author Chester McLaughlin

    (@chetmac)

    Just pushed out 1.1.30 which fixes nested loops. I haven’t tested with anything other than linked records and attachments yet. And while it should theoretically work for up to 10 nested loops, I haven’t tested it that deep.

    Thanks for the feedback, and let me know how it works for you!

    
    [apr_loop]
      {{Name}}
      [apr_loop1 field="Pictures"]
       {{thumbnails|large|url}}<br>
      [/apr_loop1]
    [/apr_loop]
    
    Plugin Author Chester McLaughlin

    (@chetmac)

    I’m guessing that the script runs until it times out, at which point any image “in transit” gets corrupted.

    I’m going to try using ini_get('max_execution_time') to determine the max execution limit, or just limit it to 20 seconds. Any images not downloaded in that time will simply be given the URL of the “large” image from Airtable along with a flag that it still needs to be processed. Then on subsequent loads it has a chance to complete.

    Also on the roadmap will be a “utility” on the WP Admin interface where you can type in a table name and it will use AJAX to pre-cache all the images. That should cover most scenarios where people want to use Airpress but have an extremely large library of images.

    Thanks for your feedback and your patience.

    Plugin Author Chester McLaughlin

    (@chetmac)

    I’ve pushed up 1.1.28 which contains a different method of actually doing the download (which may resolve this issue) as well as slightly better debugging output.

    also, subfolders are now used in airpress-image-cache, which you’re probably the only person in the world this will affect in that it’ll refetch the images. But that’s why it’s in a cache folder and not a storage folder ??

    Let me know if you keep seeing image errors.

    Plugin Author Chester McLaughlin

    (@chetmac)

    Can you look in your airpress-image-cache folder and see if there’s any corrupted images? Zero bytes or simply not viewable when you double click? I’m going to add some better debugging to see if we can’t narrow it down. I’ll let you know.

    Plugin Author Chester McLaughlin

    (@chetmac)

    Add this after line 597 in AirpressQuery.php and then let me know what the debugger output is.

    
    if ( is_wp_error( $wordpress_clone ) ){
      airpress_debug($this->getConfig(),"wp_get_image_editor error: $clone_image_path",$wordpress_clone);
      continue;
    }
    
Viewing 15 replies - 121 through 135 (of 165 total)