Ticket #472 (closed enhancement: fixed)

Opened 5 months ago

Last modified 2 months ago

Invalid URLs are created by MetaAddEditLinkColumn when using QueryString argument type and existing url already has query string parameters

Reported by: vex Owned by: somebody
Priority: minor Milestone: 1.1.2
Component: Codegen Version: 1.1.1 Stable
Keywords: codegen, datagrid Cc:

Description

When using QMetaControlArgumentType::QueryString? url's rather than pathinfo, and using a datagrid with an edit button, the resulting URL that MetaAddEditLinkColumn? creates is invalid if the existing querystring already contains query parameters. Example:

<?php 
$this->dtgUsers->MetaAddEditLinkColumn('index.php?page=edit_user', 'Edit', 'Edit', QMetaControlArgumentType::QueryString); 
?>

Results in the Edit button having the URL of index.php?page=edit_user?intId=6

To fix this meta_add_edit_column.tpl needs to be modified to check whether the URL string already has existing parameters or not.

I've included a patch file for includes/qcubed/_core/codegen/templates/db_orm/meta_datagrid/meta_add_edit_column.tpl with the necessary change (not sure what patch file format it should be though!).

Attachments

qcubed_patch.txt (434 bytes) - added by vex 5 months ago.
ticket472.patch (1.1 kB) - added by VexedPanda 5 months ago.
Re-rolled the patch in standard format

Change History

Changed 5 months ago by vex

Changed 5 months ago by VexedPanda

Re-rolled the patch in standard format

Changed 4 months ago by alex94040

  • status changed from new to in_QA
  • milestone set to 1.1.2

Changed 2 months ago by alex94040

Code review looks good; check it in!

Changed 2 months ago by VexedPanda

  • status changed from in_QA to closed
  • resolution set to fixed

(In [872]) Fixes #472 in v1.1 and v2.0

Note: See TracTickets for help on using tickets.