Skip to content

Fix wp.org review r2: Plugin URI 404 and CPT prefix#33

Merged
r00bbert merged 1 commit into
mainfrom
wporg/review-fixes-may22
May 22, 2026
Merged

Fix wp.org review r2: Plugin URI 404 and CPT prefix#33
r00bbert merged 1 commit into
mainfrom
wporg/review-fixes-may22

Conversation

@r00bbert
Copy link
Copy Markdown
Collaborator

@r00bbert r00bbert commented May 22, 2026

Resolves the two issues in the WordPress.org 22 May review.

Plugin URI 404

CPT prefix

  • Rename CPT slugs eotc_ to ettotc_, a 6-char contraction of ettic_otc that fits WordPress's 20-char post_type limit (ettic_otc_certification = 23). LEGACY_MAP keeps eotc_/opentr_/ot_ as import back-compat keys.

Housekeeping

  • Bump to 1.2.1, add changelog + upgrade notice, update CLAUDE.md.

Plugin Check on a clean distributable: 0 errors. Reviewer reply drafted in wporg-review/REPLY-2026-05-22.md.

Summary by CodeRabbit

  • Chores

    • Updated plugin version to 1.2.1
    • Standardized internal naming conventions for consistency across the codebase
  • Bug Fixes

    • Fixed plugin URI link in footer and metadata
    • Added backward compatibility for importing previously exported data

Review Change Stack

- Plugin URI and footer link to plugins.ettic.nl/opentrust (was 404)
- Rename CPT slugs eotc_ to ettotc_ (fits 20-char post_type limit)
- Bump to 1.2.1, changelog, scrub old URL from pot/po
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

📝 Walkthrough

Walkthrough

This patch release (1.2.1) corrects the custom post type slug namespace from eotc_* to ettotc_* throughout the plugin, adds legacy import remapping for early review builds, updates the plugin URI, and bumps version metadata across configuration files and documentation.

Changes

CPT slug normalization and version bump

Layer / File(s) Summary
CPT slug constants and legacy remapping
includes/class-ettic-otc-cpt.php
CPT constant values are updated from eotc_policy, eotc_certification, eotc_subprocessor, eotc_data_practice, and eotc_faq to their ettotc_* equivalents. The LEGACY_MAP is extended with entries to remap early-review eotc_* slugs to the corrected ettotc_* slugs during import.
CPT slug references in comments and docstrings
assets/js/admin.js, includes/class-ettic-otc-catalog.php, includes/class-ettic-otc-chat-summarizer.php, includes/class-ettic-otc-io.php, includes/data/certification-catalog.php, includes/data/data-practice-catalog.php, includes/data/faq-catalog.php, includes/data/subprocessor-catalog.php
Documentation comments and docstrings are updated to reference the new ettotc_* CPT slug naming across catalog definitions, admin screens, and configuration helpers.
Runtime CPT slug usage in cleanup and config
uninstall.php, wpml-config.xml
Uninstall routine post-type deletion list and WPML translation configuration entries are updated to target the new ettotc_* post types.
Version 1.2.1 metadata and changelog
open-trust-center-by-ettic.php, readme.txt
Plugin version constant and header are bumped to 1.2.1. Changelog documents the CPT rename and legacy remapping. Upgrade notice reflects the namespace correction.
Plugin URI updates
templates/trust-center.php, languages/open-trust-center-by-ettic-nl_NL.po, languages/open-trust-center-by-ettic.pot
Footer "Powered by" link and translation file entries are updated to point to the new opentrust plugin URI path.

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

bug

Suggested reviewers

  • nolderoos

Poem

🐰 The slugs have changed, from eotc to ettotc true,
With legacy maps to help the old times through.
Version bumped to 1.2.1 with URI anew,
A tidy patch with careful remap in the queue!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix wp.org review r2: Plugin URI 404 and CPT prefix' accurately summarizes the two main changes: Plugin URI fix and CPT prefix rename from eotc_ to ettotc_.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wporg/review-fixes-may22

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
languages/open-trust-center-by-ettic.pot (1)

5-5: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Regenerate the POT file to update the version header and satisfy CI.

While the Plugin URI msgid was correctly updated at line 25, the Project-Id-Version header at line 5 still references 1.2.0 instead of 1.2.1. Additionally, the pipeline is failing with an explicit error that the translation template is stale.

Regenerate the POT file by running the WP-CLI command locally:

wp i18n make-pot . languages/open-trust-center-by-ettic.pot --slug=open-trust-center-by-ettic --domain=open-trust-center-by-ettic --exclude=dist,vendor,node_modules,languages

This will ensure the version header is correct and all translatable strings are current.

Also applies to: 25-25

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@languages/open-trust-center-by-ettic.pot` at line 5, The POT file's
Project-Id-Version header ("Project-Id-Version") is stale (shows 1.2.0) and the
translation template must be regenerated; run the provided WP-CLI command (wp
i18n make-pot . languages/open-trust-center-by-ettic.pot
--slug=open-trust-center-by-ettic --domain=open-trust-center-by-ettic
--exclude=dist,vendor,node_modules,languages) locally to rebuild the .pot so the
Project-Id-Version header updates to 1.2.1 and all translatable strings (e.g.,
the Plugin URI msgid) are refreshed, then commit the regenerated POT.
languages/open-trust-center-by-ettic-nl_NL.po (1)

4-4: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the Project-Id-Version header to 1.2.1.

The Plugin URI msgid was correctly updated at line 26, but the version string in the catalog header still references 1.2.0. This should be 1.2.1 to match the plugin version being released.

📝 Proposed fix
-"Project-Id-Version: Open Trust Center by Ettic 1.2.0\n"
+"Project-Id-Version: Open Trust Center by Ettic 1.2.1\n"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@languages/open-trust-center-by-ettic-nl_NL.po` at line 4, Update the PO
catalog header Project-Id-Version value from "1.2.0" to "1.2.1": locate the
"Project-Id-Version: Open Trust Center by Ettic 1.2.0\n" entry in the PO file
and change the version suffix to 1.2.1 so it matches the updated Plugin URI and
release version.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@uninstall.php`:
- Around line 24-28: The uninstall cleanup only targets post types with the
'ettotc_' prefix (the array listing 'ettotc_policy', 'ettotc_subprocessor',
'ettotc_certification', 'ettotc_data_practice', 'ettotc_faq'), leaving legacy
'eotc_*' posts behind; update the uninstall logic to include legacy post types
as well by adding the equivalent 'eotc_policy', 'eotc_subprocessor',
'eotc_certification', 'eotc_data_practice', 'eotc_faq' entries to the
$ot_post_types array (or create a second legacy array and merge it before
deletion) so functions like the post deletion loop remove both namespaces.

---

Outside diff comments:
In `@languages/open-trust-center-by-ettic-nl_NL.po`:
- Line 4: Update the PO catalog header Project-Id-Version value from "1.2.0" to
"1.2.1": locate the "Project-Id-Version: Open Trust Center by Ettic 1.2.0\n"
entry in the PO file and change the version suffix to 1.2.1 so it matches the
updated Plugin URI and release version.

In `@languages/open-trust-center-by-ettic.pot`:
- Line 5: The POT file's Project-Id-Version header ("Project-Id-Version") is
stale (shows 1.2.0) and the translation template must be regenerated; run the
provided WP-CLI command (wp i18n make-pot .
languages/open-trust-center-by-ettic.pot --slug=open-trust-center-by-ettic
--domain=open-trust-center-by-ettic
--exclude=dist,vendor,node_modules,languages) locally to rebuild the .pot so the
Project-Id-Version header updates to 1.2.1 and all translatable strings (e.g.,
the Plugin URI msgid) are refreshed, then commit the regenerated POT.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9bd3cb81-4be6-498a-9e2c-3c8079d650b4

📥 Commits

Reviewing files that changed from the base of the PR and between c5804cb and 23fd391.

📒 Files selected for processing (16)
  • assets/js/admin.js
  • includes/class-ettic-otc-catalog.php
  • includes/class-ettic-otc-chat-summarizer.php
  • includes/class-ettic-otc-cpt.php
  • includes/class-ettic-otc-io.php
  • includes/data/certification-catalog.php
  • includes/data/data-practice-catalog.php
  • includes/data/faq-catalog.php
  • includes/data/subprocessor-catalog.php
  • languages/open-trust-center-by-ettic-nl_NL.po
  • languages/open-trust-center-by-ettic.pot
  • open-trust-center-by-ettic.php
  • readme.txt
  • templates/trust-center.php
  • uninstall.php
  • wpml-config.xml

Comment thread uninstall.php
Comment on lines +24 to +28
'ettotc_policy',
'ettotc_subprocessor',
'ettotc_certification',
'ettotc_data_practice',
'ettotc_faq',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Include legacy eotc_* CPTs in uninstall cleanup.

Right now only ettotc_* post types are deleted. If legacy eotc_* posts still exist, uninstall will leave plugin content behind. Please include both namespaces in $ot_post_types (or a fallback second list) to guarantee full data removal.

💡 Suggested patch
 $ot_post_types = [
+    // Current CPT slugs.
     'ettotc_policy',
     'ettotc_subprocessor',
     'ettotc_certification',
     'ettotc_data_practice',
     'ettotc_faq',
+    // Legacy CPT slugs from early builds (cleanup on uninstall).
+    'eotc_policy',
+    'eotc_subprocessor',
+    'eotc_certification',
+    'eotc_data_practice',
+    'eotc_faq',
 ];
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@uninstall.php` around lines 24 - 28, The uninstall cleanup only targets post
types with the 'ettotc_' prefix (the array listing 'ettotc_policy',
'ettotc_subprocessor', 'ettotc_certification', 'ettotc_data_practice',
'ettotc_faq'), leaving legacy 'eotc_*' posts behind; update the uninstall logic
to include legacy post types as well by adding the equivalent 'eotc_policy',
'eotc_subprocessor', 'eotc_certification', 'eotc_data_practice', 'eotc_faq'
entries to the $ot_post_types array (or create a second legacy array and merge
it before deletion) so functions like the post deletion loop remove both
namespaces.

@r00bbert r00bbert merged commit 453f8d9 into main May 22, 2026
10 of 11 checks passed
@r00bbert r00bbert deleted the wporg/review-fixes-may22 branch May 22, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant