Posts by tonyastley

    We recently launched a Perch Shop, and have encountered a couple of outages due to server error 500.


    The log files from the mosts recent outage look like (I've replaced the domain with sitedomain.com for privacy):


    sitedomain.com [Sat Nov 21 17:03:42 2020] [error] [client 109.158.176.47:0] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/sitedomain.com/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516

    sitedomain.com [Sat Nov 21 17:04:46 2020] [error] [client 109.158.176.47:0] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/sitedomain.com/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516

    sitedomain.com [Sat Nov 21 17:06:33 2020] [error] [client 109.158.176.47:0] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/sitedomain.com/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516

    sitedomain.com [Sat Nov 21 17:07:28 2020] [error] [client 109.158.176.47:0] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/sitedomain.com/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516

    sitedomain.com [Sun Nov 22 03:49:59 2020] [error] [client 114.119.144.62:0] End of script output before headers: start.php

    sitedomain.com [Sun Nov 22 12:30:21 2020] [error] [client 63.143.42.250:0] End of script output before headers: start.php

    sitedomain.com [Sun Nov 22 12:30:22 2020] [error] [client 63.143.42.250:0] End of script output before headers: start.php

    sitedomain.com [Sun Nov 22 23:18:54 2020] [error] [client 87.113.40.112:0] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/sitedomain.com/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516

    sitedomain.com [Sun Nov 22 23:18:57 2020] [error] [client 87.113.40.112:0] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/sitedomain.com/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516


    Could these be causing the issue?

    We have a perch shop with a checkout as guest option using the password less , the form has a next attribute that should forward the client onto a select delivery screen:

    Code
    1. <perch:form id="register" class="customerDetails" method="post" app="perch_shop" next="/shop/checkout/select-delivery">


    We use the next attribute on the standard customer create form and it works fine, however here it is simply reloading the create an account form?


    Has anyone an idea what might be happening?

    When I enable filters, adding any filter to the /addons/templates/filters.php file Perch outputs the contents of the filters.php file at the top of the document, then returns errors:


    Warning: Cannot modify header information - headers already sent by (output started at /path-to-site/perch/addons/templates/filters.php:1) in /path-to-site/perch/core/lib/PerchUtil.class.php on line 1399

    Warning: Cannot modify header information - headers already sent by (output started at/path-to-site/perch/addons/templates/filters.php:1) in/path-to-site/perch/core/lib/PerchUtil.class.php on line 1400

    Warning: Cannot modify header information - headers already sent by (output started at /path-to-site/perch/addons/templates/filters.php:1) in /path-to-site/perch/core/lib/PerchUtil.class.php on line 1401

    Warning: Cannot modify header information - headers already sent by (output started at /path-to-site/perch/addons/templates/filters.php:1) in /path-to-site/perch/core/lib/PerchUtil.class.php on line 1409


    I've seen other support tickets about whitespace before the runtime, there is no whitespace preceding the runtime call.


    Can anyone shed any light on this?

    Spot on Byron,


    The template was OK, it just wasn't in the right place. Once a set of the shop templates was copied into the normal templates folder the importer worked.


    Oddly, it always seems to loop back around to the start then throw an error for a duplicate SKU - but that doesn't bother me.


    Thank you so much, we can start testing the limits of the system now.

    Fixed the issue.


    When using an alternative template for displaying the blocks, it's important all the block tags remain in the template - even if the markup between the tags is removed.


    eg, my template ended up looking like:


    Only the markup between the block I wanted was left in the template.

    Can anyone help here?


    I'm trying to call a region called 'Page Content' from multiple pages and show a certain type of block from that page.



    When using a basic template such as:

    Code
    1. <perch:content id="title" type="text" />

    It returns the page titles of the pages fine.


    However when adding the blocks code to the template (I've simplified the blocks template to only show the id so I can try and work out what is happening):


    Code
    1. <perch:content id="title" type="text" />
    2. <perch:blocks scope-parent="true">
    3. <perch:block type="manufacturers" label="Manufacturers" scope-parent="true">
    4. <perch:content id="_block_id" type="text" />
    5. <perch:showall>
    6. </perch:block>
    7. </perch:blocks>


    The page titles don't show for some pages, other pages are missing and some pages are repeated.

    That didn't help unfortunately.


    drewm would you be able to advise:


    I'm using the standard product template in a fresh install:



    Importer script:


    And the CSV:

    I suspected Excel had not formatted the csv properly so I changed the line endings and got the following result:



    However when switching back to the original importer, the same error message appears about line 76 in the importer class, this is the area of that file it refers to:


    Not sure if that helps?


    FYI - the product importer from the support site throws the same error: https://docs.grabaperch.com/api/import/shop/products/

    I see an series of arrays, but they look malformed:


    Code
    1. Array ( [0] => uct-30 [1] => 129 100031 [2] => Product 31 [3] => product-31 [4] => 130 100032 [5] => Product 32 [6] => product-32 [7] => 131 100033 [8] => Product 33 [9] => product-33 [10] => 132 100034 [11] => Product 34 [12] => product-34 [13] => 133 100035 [14] => Product 35 [15] => product-35 [16] => 134 100036 [17] => Product 36 [18] => product-36 [19] => 135 100037 [20] => Product 37 [21] => product-37 [22] => 136 100038 [23] => Product 38 [24] => product-38 [25] => 137 100039 [26] => Product 39 [27] => product-39 [28] => 138 100040 [29] => Product 40 [30] => product-40 [31] => 139 100041 [32] => Product 41 [33] => product-41 [34] => 140 100042 [35] => Product 42 [36] => product-42 [37] => 141 100043 [38] => Product 43 [39] => product-43 [40] => 142 100044 [41] => Product 44 [42] => product-44 [43] => 143 100045 [44] => Product 45 [45] => product-45 [46] => 144 100046 [47] => Product 46 [48] => product-46 [49] => 145 100047 [50] => Product 47 [51] => product-47 [52] => 146 100048 [53] => Product 48 [54] => product-48 [55] => 147 100049 [56] => Product 49 [57] => product-49 [58] => 148 100050 [59] => Product 50 [60] => product-50 [61] => 149 100051 [62] => Product 51 [63] => product-51 [64] => 150 100052 [65] => Product 52 [66] => product-52 [67] => 151 100053 [68] => Product 53 [69] => product-53 [70] => 152 100054 [71] => Product 54 [72] => product-54 [73] => 153 100055 [74] => Product 55 [75] => product-55 [76] => 154 100056 [77] => Product 56 [78] => product-56 [79] => 155 100057 [80] => Product 57 [81] => product-57 [82] => 156 100058 [83] => Product 58 [84] => product-58 [85] => 157 100059 [86] => Product 59 [87] => product-59 [88] => 158 100060 [89] => Product 60 [90] => product-60 [91] => 159 )
    2. Array ( [0] => 100061 [1] => Product 61 [2] => product-61 [3] => 160 100062 [4] => Product 62 [5] => product-62 [6] => 161 100063 [7] => Product 63 [8] => product-63 [9] => 162 100064 [10] => Product 64 [11] => product-64 [12] => 163 100065 [13] => Product 65 [14] => product-65 [15] => 164 100066 [16] => Product 66 [17] => product-66 [18] => 165 100067 [19] => Product 67 [20] => product-67 [21] => 166 100068 [22] => Product 68 [23] => product-68 [24] => 167 100069 [25] => Product 69 [26] => product-69 [27] => 168 100070 [28] => Product 70 [29] => product-70 [30] => 169 100071 [31] => Product 71 [32] => product-71 [33] => 170 100072 [34] => Product 72 [35] => product-72 [36] => 171 100073 [37] => Product 73 [38] => product-73 [39] => 172 100074 [40] => Product 74 [41] => product-74 [42] => 173 100075 [43] => Product 75 [44] => product-75 [45] => 174 100076 [46] => Product 76 [47] => product-76 [48] => 175 100077 [49] => Product 77 [50] => product-77 [51] => 176 100078 [52] => Product 78 [53] => product-78 [54] => 177 100079 [55] => Product 79 [56] => product-79 [57] => 178 100080 [58] => Product 80 [59] => product-80 [60] => 179 100081 [61] => Product 81 [62] => product-81 [63] => 180 100082 [64] => Product 82 [65] => product-82 [66] => 181 100083 [67] => Product 83 [68] => product-83 [69] => 182 100084 [70] => Product 84 [71] => product-84 [72] => 183 100085 [73] => Product 85 [74] => product-85 [75] => 184 100086 [76] => Product 86 [77] => product-86 [78] => 185 100087 [79] => Product 87 [80] => product-87 [81] => 186 100088 [82] => Product 88 [83] => product-88 [84] => 187 100089 [85] => Product 89 [86] => product-89 [87] => 188 100090 [88] => Product 90 [89] => product-90 [90] => 189 100091 [91] => Pr )
    3. Array ( [0] => oduct 91 [1] => product-91 [2] => 190 100092 [3] => Product 92 [4] => product-92 [5] => 191 100093 [6] => Product 93 [7] => product-93 [8] => 192 100094 [9] => Product 94 [10] => product-94 [11] => 193 100095 [12] => Product 95 [13] => product-95 [14] => 194 100096 [15] => Product 96 [16] => product-96 [17] => 195 100097 [18] => Product 97 [19] => product-97 [20] => 196 100098 [21] => Product 98 [22] => product-98 [23] => 197 100099 [24] => Product 99 [25] => product-99 [26] => 198 100100 [27] => Product 100 [28] => product-100 [29] => 199 100101 [30] => Product 101 [31] => product-101 [32] => 200 100102 [33] => Product 102 [34] => product-102 [35] => 201 100103 [36] => Product 103 [37] => product-103 [38] => 202 100104 [39] => Product 104 [40] => product-104 [41] => 203 100105 [42] => Product 105 [43] => product-105 [44] => 204 100106 [45] => Product 106 [46] => product-106 [47] => 205 100107 [48] => Product 107 [49] => product-107 [50] => 206 100108 [51] => Product 108 [52] => product-108 [53] => 207 100109 [54] => Product 109 [55] => product-109 [56] => 208 100110 [57] => Product 110 [58] => product-110 [59] => 209 100111 [60] => Product 111 [61] => product-111 [62] => 210 100112 [63] => Product 112 [64] => product-112 [65] => 211 100113 [66] => Product 113 [67] => product-113 [68] => 212 100114 [69] => Product 114 [70] => product-114 [71] => 213 100115 [72] => Product 115 [73] => product-115 [74] => 214 100116 [75] => Product 116 [76] => product-116 [77] => 215 100117 [78] => Product 117 [79] => product-117 [80] => 216 100118 [81] => Product 118 [82] => product-118 [83] => 217 100119 [84] => Product 119 [85] => product-119 [86] => 218 100120 [87] => Produ )
    4. Array ( [0] => ct 120 [1] => product-120 [2] => 219 100121 [3] => Product 121 [4] => product-121 [5] => 220 100122 [6] => Product 122 [7] => product-122 [8] => 221 100123 [9] => Product 123 [10] => product-123 [11] => 222 100124 [12] => Product 124 [13] => product-124 [14] => 223 100125 [15] => Product 125 [16] => product-125 [17] => 224 100126 [18] => Product 126 [19] => product-126 [20] => 225 100127 [21] => Product 127 [22] => product-127 [23] => 226 100128 [24] => Product 128 [25] => product-128 [26] => 227 100129 [27] => Product 129 [28] => product-129 [29] => 228 100130 [30] => Product 130 [31] => product-130 [32] => 229 100131 [33] => Product 131 [34] => product-131 [35] => 230 100132 [36] => Product 132 [37] => product-132 [38] => 231 100133 [39] => Product 133 [40] => product-133 [41] => 232 100134 [42] => Product 134 [43] => product-134 [44] => 233 100135 [45] => Product 135 [46] => product-135 [47] => 234 100136 [48] => Product 136 [49] => product-136 [50] => 235 100137 [51] => Product 137 [52] => product-137 [53] => 236 100138 [54] => Product 138 [55] => product-138 [56] => 237 100139 [57] => Product 139 [58] => product-139 [59] => 238 100140 [60] => Product 140 [61] => product-140 [62] => 239 100141 [63] => Product 141 [64] => product-141 [65] => 240 100142 [66] => Product 142 [67] => product-142 [68] => 241 100143 [69] => Product 143 [70] => product-143 [71] => 242 100144 [72] => Product 144 [73] => product-144 [74] => 243 100145 [75] => Product 145 [76] => product-145 [77] => 244 100146 [78] => Product 146 [79] => product-146 [80] => 245 100147 [81] => Product 147 [82] => product-147 [83] => 246 100148 [84] => Product 148 [85] => product-148 [86] => 2 )

    Hello MxKert,


    I've tried the importer and got an error:


    Warning: Invalid argument supplied for foreach() in /path-to/Test_Shop/site-folder/perch/core/lib/api/PerchAPI_ContentImporter.class.php on line 76


    It's a fresh install of Perch Shop, any ideas what has gone wrong?


    Importer page:


    CSV:

    Code
    1. sku,title,slug,price
    2. 100001,Product 01,product-01,100
    3. 100002,Product 02,product-02,101
    4. 100003,Product 03,product-03,102
    5. 100004,Product 04,product-04,103


    In answer to your question about images - I could prep the various sizes and populate the css with the paths to the images.