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.thelunchbox.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-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.

[09-10-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:

  1. Check for save urls from what is entered on backend
  2. if none, resolve ?tag and ?category by code.

[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"

[03-23-2020] 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:

  1. Go to Entries, then select a page.
  2. On the backend of the page, select the SEO tab
  3. Scroll down to find the SEO Image Source option - set it to Custom Image
  4. Set the image you want to use.
  5. Save Changes

For Channels (Sample: Blog/Project Produce Entry)

  1. Go to SEOmatic > Content SEO
  2. Scroll down to find the SEO image Source option - set it to From Asset Field
  3. Select the field you want to use. This will be automatically applied on all blog posts.

Code Edits - This will be applied to recipes only.

[04-01-2020] Search Function Issue

Issue: Blog/Home Recipe not appearing on search results. 
Goal: Blog/Home Recipe not appearing on search results. 

[03-01-2022] Supporting Research Detail Pages

Issue: On each of the Supporting Research Detail Pages: Add Facebook, Instagram & Linked in Icons at the bottom of the page.  
Goal: Move social icons beside button

[03-06-2023] Website Integrated with GA4

[05-01-2023] Disabled Frontend Lunchbox Recipes that are Marked as "Discontinued"

Issue: Recipes "Disabled" in OneSource are still accessible in the front end if you have a link to the recipe detail page.
Goal: Make All Recipes marked as "Discontinued" or "Disabled" OneSource hidden from users in the front end.
Final Result: Set a conditional for the system to check to see if a recipe is "Discontinued" or "Disabled" in OneSource. If it has been, then serve up a 404 page for the recipe's detail page in the front end.
Additional Notes: We encountered an issue with this new conditional interfering with the "Search" Term / Category area of the Recipe Overview page which has to be fixed: https://www.thelunchbox.org/recipes-menus/recipes

[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-01-2023] Updated Top "Recipe Details" Area of Lunchbox Recipes Detail Pages

Update Overview: The following categories were commented out: Batch Quantity, Serving Size, Serving Measure, Nutrition Link, HACCP, and Recipe Source

[05-23-2023] GA4 Spam Pages Elimated 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.

[05-24-2023] Recipes Detail Page Updates Commented Out the following categories on the Recipe Detail pages: Batch Quantity, Serving Size, Serving Measure, Nutrition Link, HACCP, and Recipe Source

[07-23-23] Recipes Showing that "Ingredients list for this recipe is unavailable." This was caused by a Horizon OneSource server issue (the location where it was housed caught on fire) and was unrelated to the Craft website's backend.

[08-01-23] TLB 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-11-23] Missing Analytics from GA4 This was caused on Aug 5 when Development pushed the super table schema fixes. When doing this, they were having issues with the schema updating due to the seoMatic plugin incrementing its schema version number without using a migration file. In order to get the migration to take, they had to uninstall/reinstall the plugin which caused it to deactivate its internal setting for GTM.

Development now have a different procedure when this happens. They tweak the schema version number in the db for this plugin and then put it back after the schema update instead of uninstall/reinstall.

Subsequently, they have informed the plugin devs, and are looking into the Craft Migration System to make sure that this doesn’t happen in the future on either TLB or CAF.

[10-24-2023] Filtering of Schools Appearing in the TLB Popup, "School District Search" Area Updated to only showcase the following sub-type categories to users: State Operated Schools, County Operated Schools, Districts, Private Schools, Catholic Schools, Bureau of Indian Affairs (BIA) Schools

These updates were also made: Normalization of capitalization for displaying the Cities and a state lookup table added so that all states appear as their proper postal code

[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.

[12-13-23] Recipe API Server (Linode) Fall Updates & Upgrades

Notes for the below also exist on the Github Repo "Read Me" area but start here first:

Eg: