Posts by granttransition

    Hi Hussein,

    Isn't it very, very late over there?

    Extended diagnostic shows…

    Production mode: Production (100)





    Which explains why Debug isn't showing. So the next question is, why not? Something to do with my switch statement perhaps?


    I'm trying to debug a site and just noticed the debug table isn't displaying?

    I'm getting the following PHP warning…

    1. PHP Warning: Illegal string offset 'html' in /home/#####/public_html/control/templates/layouts/global/page_head.php on line 14

    This refering to this code…

    1. 12    $sitename = perch_content_custom('Site Name', [
    2. 13     'skip-template' => true,
    3. 14     'return-html' => true,
    4. 15    ])['html'];

    The code works, but would like to resolve the warning if possible.

    Thanks very much


    My Perch Shop tables have a huge amount of data, `shop_cart` for example has over a million rows. If I understand correctly, this table holds temp data whilst a customer is checking out. So is this data safe to truncate? It would probably be safer to remove everything apart from the last 50 entries just to be on the safe side.

    I'm just looking for conformation as to whether this is safe and in fact recommended?

    If that is, is there any other tables that would be safe to truncate on a regular basis to stop the database becoming too large. Should I even be worried about how large the database is?


    I am experiencing issues using Office 365 as a SMTP server. I'm aware that the `PERCH_EMAIL_FROM` and `PERCH_EMAIL_USERNAME` need to match, which they do, here is my settings minus sensitive information.

    HTML: SMTP Info
    1. define('PERCH_EMAIL_FROM', '######');
    2. define('PERCH_EMAIL_FROM_NAME', 'The Dudley Arms');
    3. define('PERCH_EMAIL_METHOD', 'smtp');
    4. define('PERCH_EMAIL_HOST', '');
    5. define('PERCH_EMAIL_AUTH', true);
    6. define('PERCH_EMAIL_SECURE', 'tls');
    7. define('PERCH_EMAIL_PORT', 587);
    8. define('PERCH_EMAIL_USERNAME', '######');
    9. define('PERCH_EMAIL_PASSWORD', '######');

    Email settings are correct as I can log into their email.

    Do perch forms use TLS 1.2 or above? I'm lead to believe it won’t work with anything lower – that could possibly be the issue depending how Perch is programmed to connect to SMTP server?


    I am creating a calendar on my Runway site which basically shows dates that are unavailable. I have the php and javascript up and running.

    I am now trying to input the actual dates that are unavailable via runway, so the client can enter the dates within the Runway Dashboard.

    The dates are basically a string within the form value field, and hence I’m trying to think of a way to create the string and insert it within the value. Example value="11/04/2019>21/04/2019,17/05/2019>19/05/2019,27/05/2019,28/06/2019,05/06/2019>13/06/2019". The rest of the code uses this value and display within the calendar.

    I thought I could create a shared region which has a <perch:repeater> for multiple dates. This file looks as such…

    HTML: /content/company_profile/company_profile.html
    1. <perch:group label="Unavailable Dates"> <perch:repeater id="unavailable_dates" label="Please list unavailable dates"> <perch:content id="date_from" type="date" label="Start of unavailability" format="d m Y"> <perch:content id="date_to" type="date" label="End of unavailability" format="d m Y" help="Single days require the same date to be inputted in both Start and End of unavailability"> </perch:repeater></perch:group>

    I then created a template to output the result.

    HTML: /content/company_profile/calendar_dates.html
    1. <perch:content id="date_from" type="date">><perch:content id="date_to" type="date">

    I then have a layout to bring all the elements together.

    The result I am getting currently is:

    1. <form>
    2. <input id="enteredDates" type="hidden" name="refDates" value=">,">
    3. </form>

    What am hoping to achieve is:

    1. <form>
    2. <input id="enteredDates" type="hidden" name="refDates" value="11/04/2019>21/04/2019,17/05/2019>19/05/2019,27/05/2019,28/06/2019,05/06/2019>13/06/2019">
    3. </form>

    The contents of the value field, filled with a string of dates.

    Thanks in advance


    This is more a suggestion for what I feel would improve the 'Listing all Orders' Page.

    Currently this page has columns for Order, Date, Customer, Total and Status. Under Order is actually the Invoice number and not the Order number. Also when I export orders, the results sheet lists Order Number not Invoice.

    Personally I think it would be really helpful for customers to have both Invoice Number and Order Number listed on this page and in the resulting export.

    Here is a recent question from a client which I feel raises quite a good point.

    "None of the exporting options include Invoice number and I’m trying to think of scenarios where this might be useful. E.g. a customer queries their order and provides their order number. The quickest option would be to look down the list in the backend of the website, however, this is now listed by Invoice number not order number. I think we have 2 options here – including the Invoice number in the exports or listing the orders by their Order ID instead of Invoice. Is this something that could be arranged?"

    I wondered if this is something that could be implemented?

    Hi, thank you for the responses and I now realise I haven't explained the "issue" very well.

    I previously found and read the Filtering article, and it did move me towards an answer. The article has two methods as an example. Show a single category, or display all categories.

    I wish to display a single category on my Collection -> Index page. However, this page changes in accordance with the catSlug clicked. Hence the page dynamically changes.

    I have a URL Pattern set on this page which is strengthening/category/[slug:cat].

    To hopefully illustrate further. In the Blog App, if you have Categories listed, you can click the Category link, and then a Page (Blog Archive) is presented with only those Blog articles that match that category. This is what I am trying to achieve, however, with a collection.

    Apologies for not articulating this very well in the first instance. Fingers crossed, this is now corrected.