[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] ListExecute actions on wiki pages with itemId in URL
"Domeshow Emmanuel \(@Domeshow\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a7f77a3e1a6a_38686139c40978@gitlab-sidekiq-low-urgency-cpu-bound-v2-7774c44f54-t8l7j.mail> |
Domeshow Emmanuel pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
ff5399f0 by Domeshow Emmanuel at 2026-08-14T23:06:20+03:00
[BP][FIX] ListExecute actions on wiki pages with itemId in URL
---
* [FIX] ListExecute actions on wiki pages with itemId in URL
See merge request tikiwiki/tiki!10872
- - - - -
2 changed files:
- lib/core/Sections.php
- lib/jquery_tiki/wikiplugin-listexecute.js
Changes:
=====================================
lib/core/Sections.php
=====================================
@@ -203,11 +203,15 @@ class Sections
// Pretty tracker pages return the tracker item object instead of the parent wiki page object
// We expose the parent wiki page type and objectId for the benefit of modules, plugins or smarty functions which may want to access the parent page categories and permissions
if ($section == 'wiki page' && isset($request['itemId'])) {
+ $parentObject = $cat_objid;
+ if (empty($parentObject) && ! empty($request['page'])) {
+ $parentObject = $request['page'];
+ }
return [
'type' => 'trackeritem',
'object' => (int)$request['itemId'],
'parentType' => $cat_type,
- 'parentObject' => $cat_objid,
+ 'parentObject' => $parentObject,
];
}
=====================================
lib/jquery_tiki/wikiplugin-listexecute.js
=====================================
@@ -81,7 +81,7 @@ $.fn.setupListExecute = function (id) {
$.ajax({
url: $.service('wiki', 'execute'),
type: 'POST',
- data: `page=${jqueryTiki.current_object.object}&` + $container.serialize() + '&' + (new URLSearchParams(window.location.search).toString()),
+ data: `page=${jqueryTiki.current_object.type === 'wiki page' ? jqueryTiki.current_object.object : jqueryTiki.current_object.parentObject}&` + $container.serialize() + '&' + (new URLSearchParams(window.location.search).toString()),
success: function(data) {
modal.tikiModal();
$('#tikifeedback .alert.alert-dismissible').remove();
@@ -185,7 +185,7 @@ $.fn.reloadListExecute = function() {
$.ajax({
url: $.service('wiki', 'execute'),
type: 'GET',
- data: `page=${jqueryTiki.current_object.object}&` + $container.serialize() + '&' + (new URLSearchParams(window.location.search).toString()),
+ data: `page=${jqueryTiki.current_object.type === 'wiki page' ? jqueryTiki.current_object.object : jqueryTiki.current_object.parentObject}&` + $container.serialize() + '&' + (new URLSearchParams(window.location.search).toString()),
success: function(data) {
modal.tikiModal();
let id = $container.data('id');
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/ff5399f05930b30f3344410cc13bdda4dc246339
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/ff5399f05930b30f3344410cc13bdda4dc246339
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs