Hi there,
Today my client reported one of their image fields vanished from their 'athlete spotlight' post types. I logged in to take a look and sure enough the field was missing. I decided to delete and re-add the post to see if the field re-appeared (which it did). However the post never appeared on the website. Both the news listing page and the homepage - which pulls out the latest three - show nothing new. I've tried adding more posts under the other post types and it would appear now nothing I add is appearing. I've turned on debug and see no visible errors to explain why this is suddenly happening.
I pull out stories on my listing page via:
My athlete spotlight post type template:
- <article class="news contain pull-Up is-Padded_Bott p-Entry">
- <div class="news-Article entry">
- <div class="p-Entry_Head news-Article_Head"<perch:if exists="image"> style="background-image: url(<perch:blog id="image" type="image" width="1024" height="460" crop="true" quality="90" order="2" label="Article image" bucket="articles" />);"</perch:if>>
- <div class="caput">
- <div class="hero">
- <h1>Athlete</h1>
- <h2>Spotlight</h2>
- </div>
- <p class="byline"><time itemprop="dateCreated" datetime="<perch:blog id="postDateTime" type="date" label="Date" time="true" divider-before="Publishing" format="%Y-%m-%d %H:%M:%S %Z" />" class="pubdate updated"><perch:blog id="postDateTime" type="date" time="true" format="l jS F y" /></time> · <span class="p author">Posted by <perch:blog id="authorGivenName" type="hidden" /></span></p>
- <h1><perch:blog id="postTitle" type="text" label="Article title" required="true" size="xl autowidth" order="1" /></h1>
- <perch:categories id="categories" set="news" label="Categories" display-as="checkboxes" suppress="true">
- <a href="archive.php?cat=<perch:category id="catSlug" type="slug" />" class="p-category">
- <perch:category id="catTitle" type="text" />
- </a>
- </perch:categories>
- </div>
- </div>
- <div class="p-Entry_Blocks">
- <perch:template path="content/blocks.html" rescope="parent" order="5" />
- </div>
- </div>
- <div class="news-Article_Prompt">
- <h6>ARE YOU INTERESTED IN LEARNING MORE?</h6>
- <a href="/contact-us/" class="button button-Black-solid button-Small">Get in touch</a>
- </div>
- </article>
- <perch:blog id="excerpt" type="textarea" label="Excerpt" markdown="true" editor="markitup" order="4" suppress="true" help="This will get automatically limited to 240 characters" size="l autowidth" />
- <perch:blog id="image" type="image" width="600" height="400" crop="true" quality="90" suppress="true" bucket="articles" />
- <perch:blog id="image" type="image" width="1200" height="630" crop="true" quality="90" suppress="true" bucket="articles" />
- <perch:blog id="feat_image" type="image" width="460" height="620" crop="true" quality="90" suppress="true" order="3" label="Thumbnail image for homepage" help="Make this image roughly 450x620 pixels, for best fit." bucket="articles" />
I've not updated this site in 6 months and they've been posting fine since then. I really can't get my head around why it's stopped working.
I am using Perch Runway: 3.0.4 and PHP: 7.1.32
Debug after adding a new post:
- Time Δ Debug Message - Perch Runway 3.0.4
- 0.0107 0 [1] SELECT u.*, r.* FROM perch3_users u, perch3_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='052181e94bf17df5bff430e26aa011d3' LIMIT 1
- 0.0113 0.0006 UPDATE perch3_users SET userHash='e0411131ff05644d298fac3f07400eda' WHERE userID='1'
- 0.0118 0.0005 [43] SELECT p.privKey FROM perch3_user_privileges p
- 0.0128 0.001 [37] SELECT settingID, settingValue, userID FROM perch3_settings WHERE userID=1 OR userID=0 ORDER BY userID ASC
- 0.0155 0.0027 [11] SELECT itemValue FROM perch3_menu_items WHERE itemType='app'
- 0.0185 0.003 [0] SELECT COUNT(*) FROM perch3_blog_comments WHERE commentStatus='PENDING'
- 0.0211 0.0026 [1] SELECT * FROM perch3_blog_authors WHERE authorEmail='hello@visualdecree.co.uk' LIMIT 1
- 0.0219 0.0007 [1] SELECT * FROM perch3_blog_posts WHERE postID=627
- 0.0233 0.0014 [2] SELECT * FROM perch3_blog_sections ORDER BY sectionTitle ASC
- 0.0235 0.0002 [1] SELECT * FROM perch3_blogs ORDER BY blogTitle ASC
- 0.0261 0.0027 [1] SELECT * FROM perch3_blogs WHERE blogID=1 LIMIT 1
- 0.0262 0.0001 [2] SELECT * FROM perch3_blog_sections WHERE blogID='1' ORDER BY sectionTitle ASC
- 0.029 0.0028 Using template: /templates/blog/posts/athlete_spotlight.html
- 0.0291 0.0001 Rescoping to perch:blog
- 0.0291 0 Using sub-template: /templates/content/blocks.html
- 0.03 0.0009 Using sub-template: /templates/content/testimonial_in_block.html
- 0.0386 0.0086 Edit mode: edit
- 0.0395 0.0009 [1] SELECT * FROM perch3_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 0, 1
- 0.0397 0.0001 [6] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=1 ORDER BY mi.itemOrder ASC
- 0.0401 0.0004 [1] SELECT itemTitle FROM perch3_menu_items WHERE itemType='app' AND itemValue='perch_blog' LIMIT 1
- 0.0403 0.0002 [1] SELECT * FROM perch3_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 1, 10
- 0.0404 0.0001 [2] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=2 ORDER BY mi.itemOrder ASC
- 0.0408 0.0004 File: /addons/apps/perch_blog/modes/edit.post.php
- 0.048 0.0072 [2] SELECT * FROM perch3_categories c, perch3_category_sets s WHERE c.setID=s.setID AND s.setSlug='news' ORDER BY catTreePosition ASC
- 0.0487 0.0007 Queries: 19
- 0.0487 0 Memory: 3.7204