Closed Bug 294802 Opened 20 years ago Closed 20 years ago

admin/table.html.tmpl do not replace all %%some-col-name%% in contentlink

Categories

(Bugzilla :: Administration, task)

2.19.3
task
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: u197037, Assigned: bugreport)

Details

Attachments

(1 file, 2 obsolete files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217 Construction of: [% FOREACH m = link_uri.match('%%(.+?)%%'); %] does not iterate through all the %%blah-blah-blah%% templates if more than one template is used. Think of contentlink="url.cgi?param1=%%one%%&param2=%%two%%&param3=%%one%%" - only %%one%%'s are replaced. Reproducible: Always Steps to Reproduce: 1. change any content link in admin/components/*.tmpl in the manner described in 'Details' 2. 3. Actual Results: Supposing %%one%% should be replaced with 'one' and %%two%% with 'two': url.cgi?param1=one&param2=%%two%%&param3=one Expected Results: url.cgi?param1=one&param2=two&param3=one The patch is attached
Attached patch patch, solving the problem (obsolete) — Splinter Review
Just add a cycle to parse each instance of %%blah-blah-blah%%
Attached patch patch, solving the problem (obsolete) — Splinter Review
Just add a cycle to parse each instance of %%blah-blah-blah%%
Attachment #184010 - Flags: review?
Summary: admin/table.html.tmpl do not replace all %%some-col-name%% in contentlink → admin/table.html.tmpl do not replace all %%some-col-name%% in contentlink
Version: unspecified → 2.19.3
Dennis, you might want to look at the Reviewer List and pick an appropriate specific reviewer: http://www.bugzila.org/docs/reviewer-list.html
Attachment #184010 - Flags: review? → review?(jouni)
Comment on attachment 184009 [details] [diff] [review] patch, solving the problem Remove a duplicate patch - I've double pressed submit button...
Attachment #184009 - Attachment is obsolete: true
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 184010 [details] [diff] [review] patch, solving the problem 2 things... 1) runtest.sh fails because there is a tab on the while line. You must use spaces and follow the 2-space/level indent rule. 2) Do you have a way of preventing an infinite loop if there is a %%word%% in a replacement value?? [It is far fetched, but timeless would try this]
Attachment #184010 - Flags: review?(jouni) → review-
By the way, I tried just changing the original code to use.... [% FOREACH m = link_uri.match('(?:%%(.+?)%%.*?)+'); %] but I did not get it working. It seems like an easier way, but I might be missing something obvious.
Assignee: administration → dennis.melentyev
Attachment #184010 - Attachment is obsolete: true
Attachment #184311 - Flags: review?(bugreport)
(In reply to comment #5) > (From update of attachment 184010 [details] [diff] [review] [edit]) > 2 things... > 1) runtest.sh fails because there is a tab on the while line. You must use > spaces and follow the 2-space/level indent rule. Oops... should configure my VIm... Fixed > 2) Do you have a way of preventing an infinite loop if there is a %%word%% in a > replacement value?? [It is far fetched, but timeless would try this] Yes, I also thought of this. But [% FILTER url_quote %] do that already (it just makes it '%25%25word%25%25'). (In reply to comment #6) > By the way, I tried just changing the original code to use.... > > [% FOREACH m = link_uri.match('(?:%%(.+?)%%.*?)+'); %] > > but I did not get it working. It seems like an easier way, but I might be > missing something obvious. I'm unable to find a correct regexp to do that. Afraid, It's impossible.
Status: NEW → ASSIGNED
Comment on attachment 184311 [details] [diff] [review] patch with fixed indenting (no tabs) looks good, r=joel
Attachment #184311 - Flags: review?(bugreport) → review+
Flags: approval?
Flags: approval? → approval+
Target Milestone: --- → Bugzilla 2.20
Assignee: dennis.melentyev → bugreport
Status: ASSIGNED → NEW
Checked in for Dennis: Checking in template/en/default/admin/table.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/table.html.tmpl,v <-- table.html.tmpl new revision: 1.5; previous revision: 1.4 done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: