Posts by Jason

    I have also noticed this problem / error on the Shop Dashboard, see attached, when upgrading a clients PHP version.


    The only difference between no warning and warning was the PHP version 7.1 vs 7.3. I have fixed the issue and tested / all seems to be working.

    On addons>perch_shop>modes>shop.post.php I changed count($data['items']) on lines 208 & 209 to PerchUtil::count($data['items'])

    This fixes the issue. The reason I believe is after PHP 7.2 the count function changed in behaviour. See here: https://stackoverflow.com/ques…57945/php-7-2-count-error


    Should this be in the next release of Perch Shop? drewm previous comment here tells me it should?

    Quote

    "Ah, good call. Most count() calls go through PerchUtil::count(), which should protect against this. That was a rare one which didn't.'"

    Due to things changing and me needing to split my time differently, I'm not sure what the roadmap is. There's a bunch of work done on v4, and I need to figure out whether I scale back on the initial 4.0 and ship it, try and roll those features into a 3.x and ship it, or wait until I've got more of 4.0 done.


    There's been some talk of compat issues with PHP 7.4, so I'd want to track those down and see what can be patched.

    drewm with my business hat on I would say ship an initial V4.0 sooner rather than later, this will breath (with all respect, because I really respect what you have made over the last 10 years) life into the product / create excitement. If it's paired with the new subscription model it may help the revenue which could allow you to have extra resources to develop new releases quicker, updates, documentation etc. Just my 2 cents but it is what I would do.


    I would also say Perch Shop should be a paid add-on. At the moment we can literally build a shop on a £60 Perch License. Compared to something similar like Craft I would say Perch is currently undervalued / too cheap.

    Thanks hus_hmd , yes it's got me stumped...


    Here is the debug code from the registration page after the form has been submitted.

    Sorry, still no luck! Still doesn't pull through to the CMS




    This is the debug on the User's Account Page Details


    This is the page

    Yes, this is what I get:


    I've also tried the customer_create.html default template too and hit the same issues

    Hi, Has anybody had an issue where perch shop doesn't register the initial billing & shipping addressees? I am getting this on the Debug when trying to view them.


    Invalid query: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'countryID' at row 1


    I have a country field set on the registration form, and I still get the error even when trying the default customer_create.html template. Even weirder this was working the other day and I haven't touched (I Think!) the registration process. The database on perch3_shop_addresses is also now showing a lack of this field whereas before it was filling. Can anybody help me? Thanks!

    Hi,


    I am building a shop which uses Cart Properties however when the server is using PHP 7.2 or higher it gives this PHP warning when using perch_shop_cart()


    Warning: count(): Parameter must be an array or an object that implements Countable in XXXXXXXX/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516


    After reading this threads here I changed line 516 in /addons/apps/perch_shop/lib/PerchShop_Cart.class.php from


    if (count($json)) { to if (PerchUtil::count($json)) {


    This clears the PHP warning, 2 questions, is this okay and should this be in a future update?

    Commercially we are exploring new options like Kirby CMS as we are struggling to sell Perch to larger clients due to a lack of roadmap / regular updates / bug fixes.


    From a business point of view we need more reassurance. We have a few projects to complete in Perch but it I think we will have to transition away, which is a shame because it's always been a great CMS & we've used it for years. Can Perch HQ provide any reassurance?


    For example https://perchrunway.com has been down since the start of the week, how can we refer clients to see what CMS we will be using when it flags a SSL error?


    Perch shop has this issue outstanding with no updates: SCA Regulation


    We really do love perch, there is no other CMS like it and want to continue using it but unfortunately clients do have a say in what we do as they pay the bills.

    Thanks Hussein,


    Whilst my previous solution was working, I think I prefer keeping it all within postSlug. Here's my final solution for future reference if anyone needs to composite blog urls from other fields.


    HTML
    1. <perch:blog id="postSector" type="select" label="Sector" options="Aviation|aviation, Rail|rail, Commercial|commercial, Industrial|industrial, Food Industry|food-industry, Highways|highways, Domestic|domestic" allowempty="false" required suppress>
    2. <perch:blog id="postSlugPre" type="slug" for="postTitle" label="URL Slug" suppress editable help="Delete & save to generate new slug from post title">
    3. <perch:blog id="postSlug" type="composite" for="postSector postSlugPre" join="/" suppress>

    Just been trying to get custom blog url / slugs working under the settings tab (Blog post page path & Slug format) using my own perch:blog id's...


    This last post here from Mark Fisher from the old forum outlines the exact issue:


    http://forum.grabaperch.com/fo…ynamic-fields-in-template


    Long story short as Drew mentions:

    Quote

    You should be able to use any IDs from the post.html template in the post slug

    However you currently cannot, the only id's which pull through are:

    Quote

    postID, blogID, postTitle, postSlug, postDateTime, postDescRaw, postDescHTML, postDynamicFields, postTags, postStatus, authorID, sectionID, postCommentCount, postImportID, postLegacyURL, postAllowComments, postTemplate, postMetaTemplate, postIsPublished, image, sectionTitle, SectionSlug, sectionPostCount, sectionDynamicFields, perch_image, blogTitle, blogSlug, setSlug and blogDynamicFields


    Can this be added as a bug / feature request? I appreciate you can work around it in a couple of ways using perch_blog_custom() however to keep the View Post / View Draft buttons working correctly in the control panel you have to hijack / use one of the above, looks like postTags will work for me on this occasion.

    Hi Drew,


    I've asked and it was made a default for increased security.


    It provides increased security and limits PHP opcache API calls to the path specified in that directive.

    Hi, When I try a clean install of Perch 3.1.5 on PHP 7.3 I get the following:


    Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in /srv/users/folder/apps/app-name/public/customperchname/core/lib/PerchUtil.class.php on line 1427

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/folder/apps/app-name/public/customperchname/core/lib/PerchUtil.class.php:1427) in /srv/users/folder/apps/app-name/public/customperchname/core/lib/PerchUtil.class.php on line 233


    Downgrading the server to PHP 7.1 solves the issue and installs with no errors.


    I don't believe I am doing anything wrong / I believe this is a bug.


    Note: Items in red abstracted for privacy.