GithubHelp home page GithubHelp logo

mrengy / vanguard-history Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 12.69 MB

History site for the Santa Clara Vanguard

License: GNU General Public License v3.0

PHP 46.84% JavaScript 3.01% SCSS 50.16%

vanguard-history's People

Contributors

github-actions[bot] avatar mrengy avatar shekharkhedekar avatar

Watchers

 avatar  avatar

vanguard-history's Issues

Some thumbnails in WordPress Media Library are showing as 1x1 pixel - short-term fix

Some, but not all thumbnail images in the Media Library are showing with width="1" height="1" in the <img> tag. This obviously makes them basically invisible. I'm not sure why this has happened and if it will continue to be an issue with some new uploads. It's something to explore separately

1x1-thumbnail example

As a short-term fix for this, create a script to find those 1x1 thumbnail images and set them to the size of the other ones that are correct, which is either going to be 64 x 64 or 60 x 60, or maybe something else, depending on the page in the WP Admin. Ideally set it based on observed size values of the other thumbnails on the page rather than hardcoding it.

Script should run only on WordPress Admin pages - so as to not slow down the front end. In order to do this, you'll want to create a new JS file and then on functions.php under the "enqueue scripts and styles" comment, enqueue the script using admin_enqueue_scripts.

Notes:

The site is using a plugin to enhance the media library, so you should view the media library from the prior link or navigate there under "Media" > "Assistant" rather than the usual way in WordPress.

The table formatting on the "Media" > "Library" page is messed up because of some other very narrow columns. Don't worry about that with this ticket.

Make year stories index page text dynamic in WordPress

currently it's hardcoded in archive-year_story.php. Think we'd need to convert that php file to a single page template and make a page in WordPress for it. May need to change the URL - look at downstream impacts of this, if navigating back in a breadcrumb from a single year story. Maybe this means just don't use breadcrumbs on single year stories.

Add author for year stories

Survey feedback said that people wanted to know who wrote the year story.

This author should be editable in WordPress, as the person copying and pasting in the story content will often differ from the person who actually wrote it.

Critical error from Query Monitor plugin on dev and stage sites

When the Query Monitor plugin is active on dev or stage sites, we get a "critical error" message in the browser and I got the following email. I haven't experienced this on production, but that may be because WP-DEBUG is disabled on production.

Subject: Your site is experiencing a technical issue

Body:

Howdy!

Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

In this case, WordPress caught an error with one of your plugins, Query Monitor.

First, visit your website (https://historyscv-dev.dreamhosters.com/) and check for any visible issues. Next, visit the page where the error was caught (https://historyscv-dev.dreamhosters.com/wp-admin/plugins.php) and check for any visible issues.

Please contact your host for assistance with investigating this issue further.

If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.

https://historyscv-dev.dreamhosters.com/wp-login.php?action=enter_recovery_mode&rm_token=WKaeINbZuN5VbzplpUpdQE&rm_key=V4UxjIifvSCAhzR74QfkfJ

To keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.

When seeking help with this issue, you may be asked for some of the following information:
WordPress version 6.1.1
Active theme: Twenty Twenty-Three (version 1.0)
Current plugin: Query Monitor (version 3.10.1)
PHP version 8.0.22

Error Details

An error of type E_COMPILE_ERROR was caused in line 5 of the file /home/mrengyscv/dev.historyscv/wp-content/plugins/query-monitor/vendor/composer/autoload_real.php. Error message: Cannot declare class ComposerAutoloaderInitd4d7d7d11152077b8234a5ecb185a7c0, because the name is already in use

Add appropriate letters to placement after the number

On a year story like https://historyscv-stage.dreamhosters.com/year_story/2001-scv/ there's the placement shown after the score. Currently it just shows "(4)" in this case. Make it say "1st", "2nd", "3rd", "4th", etc. as appropriate based on the number value entered.

Note, this will likely require editing this line of code in template-parts / content.php and experimenting with changing the "final placement" custom field when editing the year story in WordPress Admin

Homepage template updates

Design file

  • Add site excerpt to top - test splitting class, with link to "about" page. Put HTML in the WordPress field in staging. See how it comes through.
  • Featured story with excerpt and link to year story - could be hardcoded for now, use featured image, make new issue to make it configurable
  • Recent uploads
  • Link to "submit content"
  • Way to "see more" uploads - all media page
  • Call out content / db changes needed
  • Homepage / about page content swap, setting of front page
  • Set featured image on 2001 SCV year story
  • Create Media page
  • Add Media page to main nav

correct template for archives page

currently showing "show full story" link, repertoire, final score, and recent comments widget. Remove unnecessary elements and just show year link and excerpt and standard footer elements.

Screenshot 2022-12-13 at 15-27-09 Year Stories โ€“ LOCAL Vanguard History

Some thumbnails have not been generated from media uploaded through form

Is this an ongoing issue, or something that only took place once? If it's an ongoing issue, fix it long-term.

If we don't expect it to occur any more, perhaps just regenerate thumbnails for old media.

We can tell which thumbnails have not been properly generated - they appear as rectangles rather than squares in Media Library admin screens.

Screen Shot 2023-01-28 at 5 31 23 PM

This likely impacts other image sizes that should have been generated as well.

Related to #37

Fix layout of table view in Media > Library

Table formatting is quite messed up on "Media" > "Library", with some very narrow and tall columns.

broken-table-layout

Alternately, there is "Media" > "Assistant", which doesn't have this problem, but we should fix the layout on "Media" > "Library" anyway, as some volunteers may end up here.

First see about addressing this by seeing if we can eliminate some unnecessary columns (ideally in configuration, another plugin, or php, before the HTML is generated).

If that fails, address it in CSS.

Some suggestions in this support thread

Material Upload form - adjustments to reduce duplicate names

Let's see if we can reduce the duplication of different variations on names of people so that we can have cleaner links to "all material created by _".

for "creator" field: Allow selection of existing names as well as entering in a new name.

for "your name" (uploader):

  1. use name from WordPress account if logged in
  2. (if not logged in) allow selection of existing names as well as entering in a new name

Design page with upload form

Follow VMAPA brand guidelines. I don't have any more specific design specifications than this at the moment other than to make it appear as part of the VMAPA family but a different site from scvanguard.org.

Material Upload Form - allow user-submitted tags

to populate theme pages.

Pre-select from existing tags as the primary action before entering a new one (preferably only from items with visibility set to published) in order to help reduce duplication

When files have been uploaded to media library, delete from GravityForms uploads directory to save hosting cost

Verify that the files are in the media library and the WordPress uploads directory before deleting from the GravityForms uploads directory.

Or maybe this runs on a cron job several days after submission so that there is a grace period that can help avoid accidental deletion of things we haven't gotten into the WordPress uploads directory.

Or just delete GravityForms uploads upon uploading to media library but have a temporary backup (like a "trash" folder) to go back to if needed.

Update comment markup

The current comment markup looks like this:

<article id="div-comment-1" class="comment-body">
  <footer class="comment-meta">
    <div class="comment-author vcard">
      <img class="avatar avatar-80 photo" />
      <b class="fn"><a class="url">...</a></b>
      <span class="says">says:</span>
    </div>
    <!-- .comment-author -->

    <div class="comment-metadata">
      <a> <time datetime="2022-12-02T18:24:38-08:00">...</time></a>
      <span class="edit-link"><a class="comment-edit-link">Edit</a></span>
    </div>
    <!-- .comment-metadata -->
  </footer>
  <!-- .comment-meta -->

  <div class="comment-content">
    <p>...</p>
  </div>
  <!-- .comment-content -->

  <div class="reply">
    <a class="comment-reply-link">Reply</a>
  </div>
</article>

Ideally it would be this:

<article id="div-comment-1" class="comment-body">
  <footer class="comment-meta">
    <div class="comment-avatar">
      <img class="avatar avatar-80 photo" />
    </div>
    <div class="comment-author-metadata">
      <div class="comment-author vcard">
        <b class="fn"><a class="url">...</a></b>
        <span class="says">says:</span>
      </div>
      <!-- .comment-author -->

      <div class="comment-metadata">
        <a> <time datetime="2022-12-02T18:24:38-08:00">...</time></a>
        <span class="edit-link"><a class="comment-edit-link">Edit</a></span>
      </div>
      <!-- .comment-metadata -->
    </div>
  </footer>
  <!-- .comment-meta -->

  <div class="comment-content">
    <p>...</p>
  </div>
  <!-- .comment-content -->

  <div class="reply">
    <a class="comment-reply-link">Reply</a>
  </div>
</article>

On submission of an upload form, copy the media library items to "Historical Material Repository" in Google Drive

Put the copies in the root of "Historical Material Repository" - ideally without involving Zip files or folders.

On the main scvanguard.org upload form that we are phasing out, I set this up to use Zip files for multi-item uploads via Zapier. Doing it with Zapier and not involving Zip files requires a paid Zapier account.

Short term

could set up this Zapier integration on history.scvanguard.org to put uploaded files in the root of the Historical Material Repository folder. Will involve some manual unzipping and creating shortcuts to Decades Project > Deliverables 1: Working Material subfolders for the appropriate year / corps.

Long term

  1. Perhaps there's another way with a combination of a WordPress action / GravityForms API and the Google Drive API to put uploaded files in the root of the Historical Material Repository folder without zipping them.
  2. Bonus: Also create "shortcuts" that live in the appropriate year / ensemble under Decades Project > Deliverables 1: Working Material.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.