Posts by nascent

    Just throwing it out there but my Hosting recently added PHP 8 but without the necessary MySQL extensions so when it arrives I will be keen to test on the current or a future version of Perch.

    I haven't been able to find a portable software stack, that has PHP 8 included, so I will have to wait in any case but I think with the 3.1.7 update, it is likely that Drew took care of future compatibility since himself and Rachael always showed themselves to be on the front foot when it came to compatibility with back-end technologies, namely PHP.


    Yes it is very exciting, and one can only hope that the fee is reasonable because the CMS is just great!

    Having a future for me means, no wasted years and preparation of new front end code for the version 4 release.

    That's what I love about Perch, I can focus on new technologies as they emerge, and not get bogged down in someone elses' code (hint wordpress).

    Thanks Hussein, that has solved it. I appreciate your time.

    It would be nice though if directories could be used, as I am having to append additional information to each filename, when it would be far easier to use directories. The fact is though page attributes are very useful for me because I don't have to use PHP to generate things like service worker and JSONLD code so I am glad I can continue using the very flexible Perch CMS!

    Upon further testing, for whatever reason, Perch does not recognize either .json or jsonld file extensions; least not with respect to page attributes, which is unfortunate so I'm wondering whether this may be available in the future, to build on work previously done by Drew.


    What does the directory tempaltes/pages/attributes/ in your project contain?

    Generally, it contains various files, using the .html extension that contain scripts including json and json-ld.

    When I remove the files, the errors disappear when I refresh Settings for the page, but this can be inconsistent as sometimes the errors show but at other times they do not.

    I get in red:

    1. Array
    2. (
    3. [type] => 8
    4. [message] => Undefined index: path
    5. [file] => C:\PortableApps\UniServerZ\www\perch\core\apps\content\modes\
    6. [line] => 129
    7. )

    which to me is a PHP error in the core file itself so I am hoping this is addressed in a future version because I should be able to use any code I want, that would be valid in any other template, besides a pages template so my thought is that when Perch allowed various file extensions to be used in regular templates something was missed.

    I can post some code that I used in my Pages templates but as I say the error is inconsistent and only show in versions of PHP beyond 7.4, which again lead me to believe the error is actually in Perch.

    Here is some code in one file, with the .html extension:

    Hi Byron,

    You are correct, perch does not seem to like various file extensions in that directory.

    Thank you very much for pointing that out, although the situation appears to only occur in newer versions of PHP so maybe that is a heads up.

    Best regards

    Hi Clive,

    You are correct in that I have listed this issue previously.

    Saying that, being a PHP error, I am not sure how any Perch template would be the cause, and as well; it only happens on the server so I'm assuming that the interpreter is more strict than what is on localhost.

    In addition, again since this is occurring in a Core file, and as I have not made any modifications; I am not sure what investigation may be possible other than to say in Settings for each page, I am able to select different attribute templates of which I have created and will post if necessary.



    Perch is working well with the latest update, however I am getting the following error:

    Notice: Undefined index: label in /home/********/public_html/perch/core/apps/content/modes/ on line 129

    Thank you


    I am getting an Undefined Index in a perch core file, as follows:

    Notice: Undefined index: label in /home/user/public_html/perch/core/apps/content/modes/ on line 129

    PHP version 7.4 with Perch 3.1.7

    I prefer close-source personally.

    I like what Perch is.

    I don't want any changes other than on the UI side or else some plugins or add-on's.

    This isn't PHP related, but Perch related and having to do with updates. The present Dashboard isn't adapted for a strong Content-Security-Policy.

    As of right now, the CSP requires and unsafe-inline directive to permit inline styles and scripts. This defeats the whole purpose of the CSP.

    It's just a wishlist item. I would've loved to have carried on with Perch in other projects. Sad to see it go.

    Perch is working better since the 3.1.7 update.

    I have an ongoing issue with running a Service Worker, bringing the Perch Login to an unfound page but all in all the update has improved performance.

    One thing I had to do though, was create a new database and import but that happened while I was running 3.16.

    Unconfirmed but I think I can now have multiple tabs open and edit region content independently, which is very welcome if operational.

    All in all, the CMS is supported by the developers, which is very comforting for me since I have invested a huge amount of time into my templates and I don't want to have to run a HTML only website just to salvage my work, or re-design something on a new CMS.

    I think the republish feature reindexes all regions on all pages.

    Ok, so refresh my memory if you will in regard to a region, e.g., is this a result of perch_content or perch_content_create or is it just an area within a Perch template?

    Just to add, the performance issues I am noting, are more tied to using Localhost, rather than on server hardware but the issue of having to save twice persists and I believe this should be fixed, particularly when you want to do things that require updating a region where no visible content has actually changed.

    Thank you for the replies.

    I have started adding no-index to some fields but is it true that I must save each templated region or content area individually?

    In other words, can I not simply use something like Republish Pages instead?

    Perch already has major performance issues when it comes to saving content, for example: I open all content areas for a particular page in New Tabs of a web browser (any) and go to click each "Save Changes" button individually but alas I must click it again or else use CTRL+S just to see Content Saved Successfully.

    Saying that, it can take up to 10 seconds to actually save content!

    I am holding out hope that V4 actually improves performance of Perch and offers new features as well, particularly in the area of saving content because I'd not want to pick up a web developer job from someone who used Perch before me were I to know the true state of play.


    I am getting this in Perch settings:

    1. Array
    2. ( [type] => 8192 [message] => Function get_magic_quotes_gpc() is deprecated [file] => C:\PortableApps\UniServerZ\www\perch\core\lib\PerchUtil.class.php [line] => 1382
    3. )

    I was getting a similar message in web page output, however they are gone with the 3.16 update, however I was under the impression that all notices were gone with PHP 7.4.

    If I delete:

    1. if (get_magic_quotes_gpc()) {
    2. $strip = true;
    3. }

    From the aforementioned file, there is no longer a message so maybe there is still a bug of some kind?

    Thank you Hussein,

    So, before I begin adding no-index to every single perch:content template tag, would there be some tags where I don't need actually to add this attribute, e.g. tags that just duplicate content or else hidden tags?

    I am not sure if my logic is correct but with the Magic Quotes situation now rectified, I would like to see if I can gain any kind of optimisation in regard to my data that may yield a performance increase but I don't want to willy-nilly add attributes that don't actually do anything or else will hamper performance in the longer term.

    I set PERCH_UNDO_BUFFER to 2 (I saw a previous post of yours on this subject) as I don't really need to be worried about revisions as I am the Content Editor and developer so can that be set to 1 or 0?

    My site is in development mode as well but I will save questions on that for a later post, along with configuration questions going forward because I have a feeling that with V4, things will change in ways that will allow us to do more but of course this is speculation on my part.

    Best regards


    I recently discovered the no-index attribute however, I was wondering what this actually does in practice since I don't use any sorting of data and simply have images and content from the database.

    Saying that, however I have used Perch PHP commands to retrieve data from the database to re-use in Perch templates so if for example, I marked every field with no-index, would I at some stage run into trouble?

    Also, what would happen to the database in terms of previously indexed content, i.e., would my database shrink?

    Cheers and thank you to the team and developers, for remaining positive at this time of change for our beloved Perch CMS.