Posts by JordinB

    Sometimes the same collection items might need to be ordered differently depending on the context they are being used. It would be nice to be able to use the drag and drop item ordering on more than the default context.

    What I mean is i may have a collection of fabrics. And they are categoriezed by "Design: Plains, Patterns", they are also categoried by "Color Groups : blue, brown, yellow ...". Since we can't seem to order by a collection categorization, it would be cool if we could instead defined a new ordering context. Then i could order the items differently for a page that wants to display the fabrics ordered by the color group category vs a page that needs to display the fabrics ordered by the design category.

    I could see this implemented with a small header above the reordering items to manage the contexts: select box to change current context, add button to create a new context, delete to remove etc. If you change the context, the items refresh with the ordering of that context. And you can't delete the default context.

    you said you're in a docker env ? you probably access the site specifying to port in the address ? if so you'll need to add that to the license validation

    So i've tried, but i don't see any difference from what I was previously doing. The assets import and are assocated to the collection items. I still don't see anything in the resource_log table to suggest that they won't be deleted though.

    Is there some sort of indexing or another funciton that needs to be called maybe ?

    yeah from what i've seen its in the resource_log table, the resrouces are cleaned up if they don't have an entry, but importing resources for my collection item didn't add any resource log even though it assocated the resource with the collection item.


    I've built a data importer app to import collection items with images.

    My issue is that in the collection template, the image field has multiple cropped versions:

    1. <perch:content id="image" type="image" bucket="fabrics" crop width="900" height="600" label="Image" />
    2. <perch:content id="image" type="image" bucket="fabrics" crop width="190" height="126" />

    And now the cropped images have magically dissapeared while the original image and the thumb@2x version still exists.

    The importer follows the following steps:

    1. user uploads zip file with images, and system extracts zip and imports each file saving the data result to associate with the collection items.

    2. user uploads csv file with collection item data and importer matches collection item with previously uploaded image via filename.

    3. importer uses the new assetID with the CollectionbImporter and Template to insert or update the data.

    In perch i see the collection items and images fine. Then all of a sudden it looks like perch doesn't recognize that the cropped images are assocated with any content so it cleans them.

    At least locally i have phpStorms LocalHistory function to restore but i cant publish to the server until this is figured out.

    Has anyone had an issue like this where the cropped images imported dissapear ?


    Hard to say. I too have setup a local site to use the database remotely, but that does t seem to be the issue here. It sound more of a permissions issue.

    Maybe if you could elaborate a little more on how you have the site setup, which server you’re using etc. Folder/file permissions. We might be able to narrow it down a bit.


    Is it possible to use an id within a perch:related object as part of the collection item title or slug ?

    I ask because I have the following collection template:

    1. <perch:content id="slug" type="slug" for="name" label="URL Slug" />
    2. <perch:related id="fabric" collection="Fabrics" label="Fabric" max="1" required />
    3. <perch:content id="name" /><perch:content id="slug" />
    4. </perch:related>
    5. <perch:content id="name" type="text" label="Color Name" title required />

    As you can see it has a relation to fabrics with max=1. I'd like to be able to use the name from the related object as part of the title and slug of the main collection item.

    is this possible?

    is docker passing the server host name as the staging domain or localhost to the php inside the container?

    if you setup a simple php test page and var_dump($_SERVER); what do you get for the host name within the container ?