51 serious plugin conflicts [IN PROGRESS]#58
Open
mai-tran-03 wants to merge 12 commits into
Open
Conversation
added 7 commits
May 5, 2026 21:41
…lking_tour_items, update upgrade hook to copy old tour tables to new walking tour tables ensuring old ones preserved for existing installation and new ones created for new installation
added 5 commits
June 16, 2026 15:33
…our item, with at least two markers, show path
…tons not showing up
There was a problem hiding this comment.
Pull request overview
This PR addresses plugin conflicts with Tour Builder by namespacing the WalkingTour plugin’s database tables, routes, and model layer, and by updating admin/public UI code to match the renamed resources.
Changes:
- Renames core records/tables from
Tour/TourItemtoWalkingTour/WalkingTourItemand adds upgrade-time migration to new prefixed table names. - Updates admin/public routes and templates to use
walking-tours/*endpoints andwalking_tourview variables. - Improves map UI robustness (guards around missing route/marker data) and adds an admin “live preview” refresh path.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| WalkingTourPlugin.php | Renames install/uninstall tables and adds upgrade migration into new walking_* tables. |
| routes.ini | Moves admin routes under walking-tours/:action to avoid collisions. |
| plugin.ini | Bumps plugin version. |
| controllers/ToursController.php | Switches default model to WalkingTour. |
| controllers/IndexController.php | Updates to WalkingTour tables and adds preview endpoint + query adjustments. |
| helpers/TourFunctions.php | Renames helper functions and updates current-record accessors for walking tours. |
| models/WalkingTour.php | Renames record class to WalkingTour and updates item linkage to WalkingTourItem. |
| models/WalkingTourItem.php | Renames record class to WalkingTourItem and updates relations. |
| models/WalkingTourTable.php | Renames table class and updates SQL to use walking_tour_items. |
| views/admin/tours/browse.php | Updates browsing UI to use walking tour helpers/variables. |
| views/admin/tours/show.php | Updates metadata access and variable names to walking_tour. |
| views/admin/tours/add.php | Updates add form to use walking tour variables and formatting. |
| views/admin/tours/edit.php | Updates edit page layout and fixes public map link building for walking tours. |
| views/admin/tours/form.php | Renames form bindings/variables and switches admin preview JS include. |
| views/admin/javascripts/walking-tour-admin.js | Adds admin live preview refresh and additional routing error handling. |
| views/admin/css/tour-1.7.css | Reformats and adds layout styling for the updated admin form/sidebar. |
| views/public/index/index.php | Updates public filter label text. |
| views/public/javascripts/walking-tour-public.js | Adds guards and improves stability around marker/route parsing and bounds fitting. |
| views/public/css/walking-tour-public.css | Adds/updates public map UI styling and component layout. |
Comments suppressed due to low confidence (6)
models/WalkingTourItem.php:22
getItem()is fetching from theWalkingTourItemtable usingitem_id, which will return the wrong record type (or null) and breaks theItemrelation. It should fetch from theItemtable byitem_id.
models/WalkingTourTable.php:56Omeka_Db_Select_PublicPermissions::apply()is being called with the table alias'tours', but this table is nowwalking_tours(and the select is ordered bywalking_tours.id). Using the wrong alias can cause SQL errors or skip permission filtering.
models/WalkingTourTable.php:44findImageByTourId()builds a SQL query joiningfiles ftowalking_tour_items tiusingON i.id = ti.item_id, but theialias is not defined in this query. This will fail at runtime if the method is called, and the join condition also doesn't appear to match the intent (files vs items).
views/admin/javascripts/walking-tour-admin.js:252refreshCurrentTourPreview()usesmarkerData[currentTour]beforemarkerDatais guaranteed to be initialized (it is only populated later bydoQuery()'s AJAX response). If the user edits tour items beforemarkerDatais set, this will throw aTypeError.
views/admin/javascripts/walking-tour-admin.js:312- The marker icon HTML closes with
</spam>instead of</span>, which results in invalid markup and can break the custom marker rendering in some browsers.
views/admin/javascripts/walking-tour-admin.js:343 - The OpenRouteService API key is embedded directly in client-side JavaScript (
Authorization: ...). This exposes the key to anyone who can load the admin page (and the same key also appears elsewhere in this repo), which can lead to key theft/abuse and unexpected billing/rate-limiting.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixing #51