Ga naar inhoud

HetCCV Project Documentation

Table of Contents


Overview

HetCCV is a specialized WordPress project that manages certification institutions (CIs) and company certifications. This documentation covers project-specific procedures and workflows.


Changing Certification Institution Names

When a Certification Institution (CI) needs to be renamed, follow this procedure carefully to ensure data integrity and proper associations.

Prerequisites

  • Access to WordPress admin
  • Access to WP-CLI
  • Latest CSV export file from the CI with the new name

Process

Step 1: Clean Existing Records

Upload a dummy import file with 1 record for the CI in question via the upload page. This cleans up existing records.

Step 2: Queue and Run Import

Run the WP-CLI commands to queue and process the import:

wp cron event run ccv_ci_uploads

Then manually run the import to process the queue.

Step 3: Remove Existing Certifications

Execute the import to remove all existing associations (certifications).

Warning

CRITICAL: If you skip this step, all certifications from the current CI will have no valid CI linked and must be manually deleted. This would result in a clean install requirement for all affected companies.

Step 4: Validate Removal

Check several companies that should have had certifications from the current CI to validate that these certifications have been removed.

Step 5: Update CI Name in WordPress

Go to the CI post object in WordPress and update the name of the current CI to the new name.

Step 6: Update Upload Page

Update the relevant upload page for the current CI with the new name:

  1. Update the page title
  2. Update the GForms block variable with the new CI name

Warning

CRITICAL: The GForms variable in the Gutenberg editor MUST be updated to the new name. If you don't do this, all certifications from future uploads via this form will not be properly linked, requiring a company database wipe.

Step 7: Upload New CSV

Upload the most recent/current CSV file via the upload page with the new name.

Step 8: Queue New Import

Run the WP-CLI command again to prepare the queue:

wp cron event run ccv_ci_uploads

Step 9: Process Import

Manually run the import. The certifications should now be added to companies under the new CI name.

Verification

After completing the process:

  1. Check multiple companies that should have certifications from the renamed CI
  2. Verify the certifications are properly linked to the new CI name
  3. Test the upload form to ensure new certifications are properly associated
  4. Monitor the import logs for any errors

Common Issues

Certifications not properly linked: - Ensure GForms variable was updated in step 6 - Check that the CI name in the CSV exactly matches the new name in WordPress

Import queue not processing: - Check WP-Cron is functioning properly - Verify file upload permissions - Check PHP error logs for issues

Companies missing certifications: - Ensure step 3 was completed before renaming - Verify the CSV file contains all expected records - Check import logs for processing errors


See Also