TracQuery: Update Button Missing

41 views
Skip to first unread message

Will Green

unread,
May 13, 2013, 10:54:58 AM5/13/13
to trac-...@googlegroups.com
Hello,

I'm running Trac 1.0.0 on CentOS 6. When I try to use the custom query
interface the update button is missing. This happens on Chrome,
Safari, IE and Firefox. See screenshot:
https://flux.org.uk/tmp/trac-no-update-button.png

When I query the source in a browser it seems the div containing the
button is set not to be displayed:

<div class="buttons" style="display: none;">
<input type="hidden" value="priority" name="order">
<input type="submit" value="Update" name="update">
</div>

I have admin permissions and trac.ticket.query.*, QueryModule and
TicketQueryMacro are enabled. Running trac-admin upgrade says the
database is up-to-date.

Could installing/uninstalling a plugin have caused this? This is the
first time I've used this feature, so not sure if it was working when
I first installed Trac.

Not managed to find any similar cases on the mailing list or in the
documentation. Am I missing something obvious?

TIA,
Will

RjOllos

unread,
May 14, 2013, 6:01:32 PM5/14/13
to trac-...@googlegroups.com
Hi Will,

That style attribute isn't part of the template source:

One possible explanation is that a plugin that implements ITemplateFilter is modifying the template before it is rendered in the browser.

Which plugins do you have installed? Is this a new installation, or have you just upgraded?

- Ryan

Patterson, Candace

unread,
May 22, 2013, 4:05:46 PM5/22/13
to trac-...@googlegroups.com

--

 

Hi, I am having the same problem with the missing Update button on the Query page.  I am running Trac version 0.12, and it was a new installation.  I, too, don’t know if the Update button was ever there, or if it disappeared at some point.  I am using the following plugins:

 

AdvancedTicketWorkflowPlugin-0.11dev-py2.7.egg

BlackMagicTicketTweaks-0.11r1-py2.7.egg

CondFieldsGenshiPlugin-0.2-py2.7.egg

GroupTicketFields-0.0.1dev-py2.7.egg

TicketValidator-0.1-py2.7.egg

ticket_clone.py

TracAnnouncer-0.11.1-py2.7.egg

TracCustomFieldAdmin-0.2.8-py2.7.egg

TracDynamicFields-1.2.3-py2.7.egg

TracTicketValidator-0.1-py2.7.egg

trac_WorkflowNotificationPlugin-0.4-py2.7.egg

 

Any idea if these plugins cause a problem?

 

Thanks,

Candace

 


 
 



The information contained in this email message, including any attachments, is
for the sole use of the intended recipients(s) and may contain confidential and
privileged information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient and have received this
communication in error, please contact the sender by reply e-mail and destroy all
copies of the original message.

RjOllos

unread,
May 22, 2013, 4:31:21 PM5/22/13
to trac-...@googlegroups.com
I wouldn't guess that any of those plugins would cause a problem, but guesses are rarely useful. I would suggest just disabling them all and seeing if the button re-appears, and if it does, re-enable them one at a time until you find the culprit.

A quick look at BlackMagicTicketTweaksPlugin shows that it filters query.html, so that is a possible culprit. 

Steffen Hoffmann

unread,
May 22, 2013, 7:26:14 PM5/22/13
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 22.05.2013 22:31, RjOllos wrote:
> I wouldn't guess that any of those plugins would cause a problem,
Nice, I've been instinctively thinking exactly the same on first sight
of that illustrious plugin collection.

Steffen Hoffmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlGdVBEACgkQ31DJeiZFuHcnqACg3UeKotR2q89tq2p/eccFcZY5
aHcAoK4ysj7oQ4q5GBj5YQaBDDd4zSUZ
=Irmj
-----END PGP SIGNATURE-----

Patterson, Candace

unread,
May 23, 2013, 2:55:48 PM5/23/13
to trac-...@googlegroups.com

It appears that the TracDynamicFields plugin is causing the Update button to disappear.  Any suggestions how can I fix the problem (other than disabling the plugin)? 

 

Thanks,

Candace

 

 

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To post to this group, send email to trac-...@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

RjOllos

unread,
May 23, 2013, 3:13:30 PM5/23/13
to trac-...@googlegroups.com
I tried to reproduce the issue, but could not, so I suspect it must depend on your TracDynamicFields plugin configuration. Could you post your [ticket-custom] section from trac.ini? 
 

Patterson, Candace

unread,
May 23, 2013, 5:43:00 PM5/23/13
to trac-...@googlegroups.com

--

 

 

You are right about a problem within the [ticket-custom] section.  Thanks so much for your help!!!  I narrowed it down to the following line.  When I removed the line, the Update button came back on the Custom Query page.

 

[ticket-custom]

priority.show_when_origination = SomethingElse

 

I originally put in this line to hide the Priority field (because “SomethingElse” was not a real value -- thus the equation would never equal true).  Then, I realized that I could remove everything from the Priority section in the Admin account and accomplish the same thing. 

 

But…. I still had similar statements in that section for Component, Description, Milestone, and Version, and they didn’t cause a problem.  (I also later modified those fields in the Admin account).

 

Is there something special about the Priority field that would cause the problem?  Or was I just lucky that the others didn’t cause a problem since I was checking them against a non-existent value?

 

Thanks!


You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To post to this group, send email to trac-...@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

RjOllos

unread,
May 24, 2013, 9:47:22 PM5/24/13
to trac-...@googlegroups.com
I could reproduce the issue with:

priority.show_when_type = SomethingElse
 

I originally put in this line to hide the Priority field (because “SomethingElse” was not a real value -- thus the equation would never equal true).  Then, I realized that I could remove everything from the Priority section in the Admin account and accomplish the same thing. 

You can also accomplish hiding a field with the `hide_always` rule,

 

But…. I still had similar statements in that section for Component, Description, Milestone, and Version, and they didn’t cause a problem.  (I also later modified those fields in the Admin account).

 

Is there something special about the Priority field that would cause the problem?  Or was I just lucky that the others didn’t cause a problem since I was checking them against a non-existent value?

The jQuery selector that applies the hide rule on the Query page selects the parent of `input[value="priority"]` for your case. This caused the button group that wraps the Update button to also be selected and hidden, since its HTML is:

<div class="buttons">
          <input type="hidden" name="order" value="priority">
          <input type="submit" name="update" value="Update">
</div> 

I've opened a ticket and will post a patch shortly,
 

Steffen Hoffmann

unread,
May 28, 2013, 4:01:36 PM5/28/13
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

N 25.05.2013 03:47, RjOllos wrote:
> The jQuery selector that applies the hide rule on the Query page selects
> the parent of `input[value="priority"]` for your case. This caused the
> button group that wraps the Update button to also be selected and
> hidden, since its HTML is:
>
> <div class="buttons">
> <input type="hidden" name="order" value="priority">
> <input type="submit" name="update" value="Update">
> </div>
>
> I've opened a ticket and will post a patch shortly,
> https://trac-hacks.org/ticket/11118

Nice find, good diagnosis work.

Steffen Hoffmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlGlDREACgkQ31DJeiZFuHdyWgCeObGcf2hSdgZRtLtbFp63/M4g
DWcAnRCRoffdT6kSx4l9axYS/ka3X/mz
=AJXR
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages