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 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:

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

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

  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.

[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