Below you'll find a log of the various maintenance items performed on the Chef Ann Foundation website.
Development: For each entry please include the date, issue/maintenance update & documentation of the resolution.
[7-30-2020] Reliquary Plugin Updates
Issue: Reliquary search keyword breakdown taking up too much space in the database
Goal: Reduce keyword storage size by simplifying search behavior
In order to provide more fine-tuned control over search relevance and allow for partial matching, a custom system was produced over top of the built-in MySQL search mechanism within the Reliquary plugin. These features were supplemented by custom data tables storing keyed data for the searchable content on the Craft site, but the volume of content exceeded what could be safely indexed within a 1GB instance, and thus this extra indexable data was removed from the search capabilities of the Reliquary plugin and instead the plugin now relies on the built-in search, to avoid the extra data overhead.
[8-15-2020] Craft Updates, Prostack -> Universal Migration
Issue: Craft caching was taking up too much space in the database
Goal: Reduce database use by upgrading Craft to a version that no longer stores cache information in the database.
Before Craft 3.5, when caches were created for templates, the queries used in template generation would also be stored in the database. The volume of queries used in generating most pages would typically result in over 1MB of data being stored per page generated. Page generation could be optimized to reduce the queries used, but ultimately each cache would have some cost to the database, and thus there would always be a cap to how many entries could be cached at once. In Craft 3.5, Craft no longer uses the database for template caching, and instead stores this data in local files. Updating Craft (and currently installed plugins) from 3.4 to 3.5 did not require additional fixes or work to fully deploy.
[08-31-2020] Forced Newsletter URL
Issue: Newsletter Form Only Appears on Delay vs. Immediately
Goal: Provide a URL that forces the Newsletter Form to appear
Created this URL https://www.chefannfoundation.org/#newsletter-signup that will force the Newsletter to appear for users when clicked.
NOTE: When the form loads you'll notice on all browsers that the first checkbox next to “School Food News” will show up as the native browser checkbox and then will update to display the actually designed checkbox. This causes the newsletter height to quickly jump in height.
The reason this happens is that the newsletter appears immediately and because these checkboxes are coming in from a jquery extension causing a delay in styling. We attempted to delay the newsletter from appearing for a second or two, but that didn't solve the problem. This is because third-party scripts like jquery are loaded after everything else so you can't control them.
[09-01-2020] Website Went Down
Issue: Website Went Down
Goal: Get Site Back Up
First, we migrated to the "enterprise" platform right before going live. This setup is different from the "lower" non-enterprise platform, there's no SFTP, all pushes are via git. After going live, the site was migrated back to the non-enterprise (old app) and made updates.
The breakdown happened when we followed the enterprise method to push, as that was our last setup when pushing our edits, and the older composer.json was carried over to the live non-enterprise app. We didn't catch it immediately because of site caching so when we loaded the pages to test, all seemed to work fine. Once the site cache cleared it caused the issue to appear and the site went down.
We have since reverted the composer and Craft core files which made the site go back online.
[09-04-2020] Changes to Redirects
Issue: Redirects with query params (ex. ?tag= ) wasn’t being catch by the Site redirect plugin
Goal: To redirect the urls with query params with the correct redirect url
We’ve used a jQuery method for this. The values will be manually entered here - /cube/globals/customRedirects
A few notes if the page will have a query parameter please also add the base on the setting. Then, don’t add/ remove it from the “Site Redirect” setting.
For Example: /covid-19 /covid-19?tab=for-parents1
The logic of this method is like this:
[09-08-2020] Block copying/pasting and configuration collapsing
Issue: Block copying/pasting is not functioning, block configuration does not collapse by default
Goal: Investigate issues and provide updates as possible
Testing an update to the Smith plugin (which provides block copying/pasting functionality) it seems it has an issue with passing a list of every block that exists in a matrix as part of the request, which easily exhausts the php_max_vars limit. Even at the highest setting on Fortrabbit (which is 10,000) it still wouldn't work given it's trying to pass over 13,000 fields. I have further reported the issue here https://github.com/verbb/smith/issues/1 but it seems like the issue might have been longer-standing.
The Encapsulator module was updated to account for markup changes made by craft, which originally caused the configuration collapsing to stop working.
[10-02-2020] Page Speed Optimization
Issue: Found that the sites loaded very slowly during review. They're not sure if it's an internet connectivity issue or TTL.
Goal: Double check loading time and optimize where possible.
[10-16-2020] Newsletter Popup Documentation
Issue: Raised 08-24-20, Pop-up is still appearing after user clicks “x” or fills it out. It’s not doing this on The Lunch Box website. Both CAF Team and myself tried in a browser type that we never use + incognito browser and can confirm it’s still happening.
Goal: If should also never appear again whenever they start a new session. So for instance, if they go to the website today and click “x” and then go back tomorrow, the pop-up shouldn’t appear again for them ever again unless they clear their cache/cookies.
The fix was to turn the sessionStorage value for the “popup_hideForever” to a localStorage.
[10-16-2020] Newsletter Popup Salesforce Documentation
Issue: Newsletter Pop-up’s not seeming to be connected between Salesforce & Campaign Monitor Anymore
Goal: Connect the form again to Salesforce
[10-22-2020] Smith Plugin Update
Issue: Smith plugin has an error that does not allow copy/paste/clone
Goal: Update Smith plugin now that a fix has been produced upstream
[10-29-2020] Addition of GTM
Issue: Addition of GTM
Goal: Addition of GTM
GTM codes added on SEOmatic > Tracking Scripts > Google gtag.js . Add the codes on "Script Template" and "Body Script Template"
[11-18-2020] Home Recipes Template Page Update
Issue: Addition of Video and an Optional image on Home Recipes
Goal: Addition of Video and an Optional image on Home Recipes
[03-23-2021] Update to Open Graph Image Integration
Issue: When someone clicks one of the social icons at the bottom of a blog post (like this one), we would like the social media post to pull the header image. In this case, the operator's hands and packed lunches. Right now, all shared blogs/pages show the single "global image" that we picked right before launch, of the 3 kiddos eating at a table."
Goal: Variety of images to appear for social media posts, particularly with any new or featured section that's posted online
Backend edits: For Pages/Single Entries:
For Channels (Sample: Blog/Project Produce Entry)
[04-01-2021] Search Function Issue
Issue: Blog/Home Recipe not appearing on search results.
Goal: Blog/Home Recipe not appearing on search results.
[05-12-2021] Add Facebook Meta Indication
Issue: Add Facebook Meta Indication
Goal: Add Facebook Meta Indication
[03-06-2023] Website Integrated with GA4
[05-13-23] Craft Registration Emails Update Switched registration emails from going through Gmail to Sparkpost Mailer so that emails will no longer encounter issues when submitting to new Craft User Registrants.
[05-23-2023] Website Went Down
Reason Why Snapshot: New code for the TLB Recipes Detail page was accidentally placed directly on the CAF FTP Site instead of the TLB FTP Site.
Explanation from DEV: I didn't know the process had changed, from what I could tell from the readme still up on the server, it was using the file syncing scripts that we had originally put together for some of the Craft projects, so I figured direct FTP was still suitable, as that kind of file replacement was what those scripts still did. I'll make sure to check on that process for any future work.
Also yes, the recipe page component was copied on both sides, I had the wrong project open via FTP at the time. After I noticed the mistake, I went and checked on CAF to make sure that pages still worked, and that there wasn't any recipe page that was using that component, since it looked on the backend like there were some components that were identical from the Lunchbox side, and I figured that they were just remnants of some old edits.
Pages were still working fine, it didn't seem to affect their home recipes page, which used different components, and no other files were replaced, so I believed that things were fine. Even the copies of the files in the repos were still the same: https://github.com/frankandvictor/caf-001/blob/master/src/components/PageRecipe/_PageRecipe.twig
[05-23-2023] GA4 Spam Pages Eliminated The reason this was happening is that spammers are sending events to random Analytics properties (UA and GA4, etc.) to get folks to click on links and build fake SEO reputations for themselves. This is why you're seeing those fake pages in your analytics.
This article explains everything needed to know about the issue: https://www.vakulski-group.com/blog/post/how-to-use-a-hostname-filter-in-ga4/
We setup a Hostname vs Users Exploration (Method B from article) and you can see that a hostname: www.hcufxe.shop along with others are sending traffic to this GA4 property. caf-001-prod-v1.frb.io is the underlying Fortrabbit host which we'll redirect to chefannfoundation.org when we upgrade to Craft 4 along with hardening security. Also https://recipes.chefannfoundation.org which is a legit chefann landing page via unbounce. See screen shot here for report of hostnames.
We’ve also included a shot of filtering the reports when viewing to just the legit hostnames. And we also setup GTM regex filters for each of the four chefann properties as outlined in the article.
All of this helps reduce some of this but it's impossible to eliminate it altogether.
[07-13-23] CAF Website Updated from Craft CMS 3.7.13 to Craft CMS 4 & PHP 8.2
[08-07-23] SuperTable Schema Repaired & resaved the schema so site has clean SuperTable schemas post Craft 4 upgrades
[08-24-23] Search Bug Resolution The recent Craft 4 update resulted in the siteUrl variable no longer being available. This resulted in only a minor update and was under CAF's warranty.
[08-24-23] Website Updated to Craft 4.5.1
[09-25-23] Marketing Landing Page Section New "FCM Landing Pages" channel created to house one off marketing landing pages.
[09-25-23] New Module Available on the Website A new module called"CKEditor Multi Column" was created to house embedded form code and WYSIWYG text editor.
[09-30-23] Unused Modules Turned Off In order to prevent page bloat and long loading times development has turned off all modules that are unused across the website. Should the CAF team need one that's been turned off they'll need to let us know so that we can turn it back on for them.
[10-19-2023] Filtering Capabilities Added tor Team Section
[10-19-2023] Filtering Capabilities Added to "Images and Text Grid" Module
[10-20-2023] Bug Fixes & Contact Form Functionality Edits Made to "Learn. Nourish. Transform." Marketing Landing Page: https://www.chefannfoundation.org/learn-nourish-transform/
[11-08-23] Turned Off Craft Compression Technique & Implimented Image Resizer :: When uploading images into Craft it analyzes each one to be sure that there is no malicious code embedded. Unfortunately, to do this, Craft must decompress/recompress each one on upload. The recompression uses a default compression setting which when we upgraded the sites to Craft 4, we set to 60 on a scale of 1-100. Unlike modern compression techniques, Craft offers only this one value for all images which ends up increasing the file size anywhere from 20-50% after upload.
The idea behind this feature is mainly for sites that may have authors or other types of external users uploading media and the benefits of analyzing the uploads for malicious content outweigh the file size increase. In researching this image issue for you and many of our other Craft sites, we discovered that Craft has now introduced a new setting that allows this filter to be turned off.
This is especially welcome for sites like CAF/TLB where only trusted users are allowed access to update content. Because of this, we turned this filter off for both CAF and TLB.
Next, we looked into Image Resizer which works a bit differently in that it will resize images proportionately if they are over a specified size limit. We set this one up with a max height and width limit of 2560.
[12-11-23] reCaptcha added across entire website + Google disclosure added to the footer with Google’s disclosure links. When this exists on the site then we’re allowed to turn off the ugly reCaptcha icon/check box since it will check the reCaptcha box automatically in the backend for every signup. Because of this, nothing will be seen in the front end.