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.