trac 1.2 and ticket comment editing

82 views
Skip to first unread message

Roger Oberholtzer

unread,
Jan 19, 2017, 2:55:00 AM1/19/17
to trac-...@googlegroups.com
I have Trac 1.2 system where people are allowed to edit ticket
comments. When I log in as TRAC_ADMIN I get the icon set in the upper
right of the comment where I can choose to edit or whatever.

No other users (non TRAC_ADMIN) can see these icons. Even though they
have TICKET_EDIT_COMMENT permission. In fact, they have all TICKET_
permissions.

What might be the issue. I tried removing and adding the permission.
But that made no difference.

The permission is assigned to a Subject (called Ramboll), and all
these users are in the group Ramboll.


--
Roger Oberholtzer

RjOllos

unread,
Jan 19, 2017, 3:21:43 AM1/19/17
to Trac Users
The edit button navigates to a URL such as: /ticket/1?cnum_edit=1#comment:1 (e.g. for comment:1 on ticket #1). Do you get a permission error for one of those users when navigating to that path (by entering the path in the browser URL box)?

- Ryan

Roger Oberholtzer

unread,
Jan 19, 2017, 4:15:18 AM1/19/17
to trac-...@googlegroups.com
On Thu, Jan 19, 2017 at 9:21 AM, RjOllos <rjo...@gmail.com> wrote:

> The edit button navigates to a URL such as: /ticket/1?cnum_edit=1#comment:1
> (e.g. for comment:1 on ticket #1). Do you get a permission error for one of
> those users when navigating to that path (by entering the path in the
> browser URL box)?

The URL works. And an edit can be saved. Just no buttons in the GUI.
This is the same from a number of different computers where people say
this worked before I updated to Trac 1.2


--
Roger Oberholtzer

Ryan Ollos

unread,
Jan 19, 2017, 4:19:19 AM1/19/17
to trac-...@googlegroups.com

From: Roger Oberholtzer
Sent: Thursday, January 19, 01:15
Subject: Re: [Trac] Re: trac 1.2 and ticket comment editing
To: trac-...@googlegroups.com

On Thu, Jan 19, 2017 at 9:21 AM, RjOllos wrote: > The edit button navigates to a URL such as: /ticket/1?cnum_edit=1#comment:1 > (e.g. for comment:1 on ticket #1). Do you get a permission error for one of > those users when navigating to that path (by entering the path in the > browser URL box)? The URL works. And an edit can be saved. Just no buttons in the GUI. This is the same from a number of different computers where people say this worked before I updated to Trac 1.2 -- Roger Oberholtzer

The static resources are cached by the browser.  You can fix with a hard refresh of the browser page (shift + f5).

- Ryan

Roger Oberholtzer

unread,
Jan 19, 2017, 4:54:03 AM1/19/17
to trac-...@googlegroups.com
Upon further investigation, it seems that the buttons are only showing
up in my browser (firefox 45.0.2). In Explorer, Chrome and newer
firefox (Linux and Windows) they do not show up.

I see that there are complaints about the page contents. See the
attachment. The files it complaints about are untouched by us. So they
should be whatever they were when installed. Maybe newer browsers are
more picky about something?



--
Roger Oberholtzer
scrap.png

Roger Oberholtzer

unread,
Jan 19, 2017, 5:03:38 AM1/19/17
to trac-...@googlegroups.com
On Thu, Jan 19, 2017 at 10:53 AM, Roger Oberholtzer
<roger.ob...@gmail.com> wrote:

> Upon further investigation, it seems that the buttons are only showing
> up in my browser (firefox 45.0.2). In Explorer, Chrome and newer
> firefox (Linux and Windows) they do not show up.
>
> I see that there are complaints about the page contents. See the
> attachment. The files it complaints about are untouched by us. So they
> should be whatever they were when installed. Maybe newer browsers are
> more picky about something?

trac-change-panel winds up with a height of 0 in these browsers. No idea why.

--
Roger Oberholtzer

Roger Oberholtzer

unread,
Jan 19, 2017, 9:12:38 AM1/19/17
to trac-...@googlegroups.com
The problem seems to be in ticket.css. In .trac-ticket-buttons, if I
remove "visibility: hidden;", the buttons show up. I wonder why this
is this way...

--
Roger Oberholtzer

RjOllos

unread,
Jan 19, 2017, 5:00:34 PM1/19/17
to Trac Users
Did you try clearing the cached resources with a hard refresh of the page?

- Ryan 

RjOllos

unread,
Jan 19, 2017, 5:01:40 PM1/19/17
to Trac Users
Another common reason for similar issue is not refreshing the static resources when upgrading Trac:

- Ryan 

RjOllos

unread,
Jan 19, 2017, 5:05:09 PM1/19/17
to Trac Users
Yet another thing to look at is whether you've configuration [trac] jquery_location. Are you using jQuery shipped with Trac, or another version?


- Ryan 

Roger Oberholtzer

unread,
Jan 20, 2017, 2:47:47 AM1/20/17
to trac-...@googlegroups.com
On Thu, Jan 19, 2017 at 11:01 PM, RjOllos <rjo...@gmail.com> wrote:

> Another common reason for similar issue is not refreshing the static
> resources when upgrading Trac:
> https://trac.edgewall.org/wiki/TracUpgrade#a5.Refreshstaticresources

I have never done this deploy thing. I have no /deploy/path. Or at
least not one that I have made. Is there a default one if I have never
used the deploy option?

--
Roger Oberholtzer

Roger Oberholtzer

unread,
Jan 20, 2017, 2:50:41 AM1/20/17
to trac-...@googlegroups.com
On Thu, Jan 19, 2017 at 11:05 PM, RjOllos <rjo...@gmail.com> wrote:

> Yet another thing to look at is whether you've configuration [trac]
> jquery_location. Are you using jQuery shipped with Trac, or another version?
>
> https://trac.edgewall.org/wiki/TracIni#trac-section

I do not have any jquery statements in my trac.ini. So it must be
using the one that comes with Trac.

--
Roger Oberholtzer

RjOllos

unread,
Jan 20, 2017, 2:56:46 AM1/20/17
to Trac Users
Depends on how your web server is configured:

I suggest you view the page source for a page such as WikiStart on a computer that exhibits the issue, and follow the link to a static resource such as trac.css or trac.js. Compare to the repository version to determine if you are serving the latest,

- Ryan

Roger Oberholtzer

unread,
Jan 20, 2017, 4:40:28 AM1/20/17
to trac-...@googlegroups.com
What I see in the browser matches exactly what I see in the css file
on the server. In the case of the comment buttons at least.

For example, the file ./Trac-1.2-py2.7.egg/trac/htdocs/css/ticket.css contains:

/* - Change controls */
.trac-ticket-buttons {
clear: right;
visibility: hidden;
float: right;
}

And I see exactly that in the browser. If I remove "visibility:
hidden;" in the browser, the buttons show up. And, if I remove the
same text in the css file, the buttons also show up.

The questions is: why is "visibilty: hidden;" set in the css file? I
am guessing that is the default. How does it get set to something
else? Where would I see that in the browser?


--
Roger Oberholtzer

Peter Suter

unread,
Jan 20, 2017, 12:40:42 PM1/20/17
to trac-...@googlegroups.com
The buttons are not shown by default anymore, only when the mouse hovers
over a comment.
(Or when both checkboxes "[ ] Show comments [ ] Show property changes"
are unchecked.)
https://trac.edgewall.org/browser/tags/trac-1.2/trac/htdocs/js/threaded_comments.js?marks=50-76#L50
https://trac.edgewall.org/ticket/11835

Roger Oberholtzer

unread,
Jan 23, 2017, 1:33:32 AM1/23/17
to trac-...@googlegroups.com
On Fri, Jan 20, 2017 at 6:40 PM, Peter Suter <pets...@gmail.com> wrote:

> The buttons are not shown by default anymore, only when the mouse hovers
> over a comment.
> (Or when both checkboxes "[ ] Show comments [ ] Show property changes" are
> unchecked.)
> https://trac.edgewall.org/browser/tags/trac-1.2/trac/htdocs/js/threaded_comments.js?marks=50-76#L50
> https://trac.edgewall.org/ticket/11835

I do not see this. I can hoover the mouse all over the place. The
buttons do not show up. Period. Unless I remover the visibility:
hidden; text from the ticket.css file.



--
Roger Oberholtzer

RjOllos

unread,
Jan 23, 2017, 4:10:08 AM1/23/17
to Trac Users
It's one of two things: either you aren't loading the correct JavaScript (or template), or there is an error in the JavaScript execution, likely due to a plugin conflict. I would:

1. Do the hard refresh of the page to clear cached resources, which I mentioned twice, but you haven't confirmed to have done.
2. Check whether you are overriding any templates, via a ticket.html (or possibly another ticket-related html file) in your environment templates directory or a shared templates directory (1). Templates are also listed on the /about page, in the Interface Customization section
3. Check the browser console for JavaScript errors
4. Check that threaded_comment.js matches the file in the egg
5. Compare the JavaScript on one of your ticket pages to that on the demo site (2)

- Ryan


 

Roger Oberholtzer

unread,
Jan 23, 2017, 4:45:31 AM1/23/17
to trac-...@googlegroups.com


On Mon, Jan 23, 2017 at 10:10 AM, RjOllos <rjo...@gmail.com> wrote:
>
>
> On Sunday, January 22, 2017 at 10:33:32 PM UTC-8, Roger Oberholtzer wrote:
>>
>> On Fri, Jan 20, 2017 at 6:40 PM, Peter Suter <pets...@gmail.com> wrote:
>>
>> > The buttons are not shown by default anymore, only when the mouse hovers
>> > over a comment.
>> > (Or when both checkboxes "[ ] Show comments [ ] Show property changes"
>> > are
>> > unchecked.)
>> >
>> > https://trac.edgewall.org/browser/tags/trac-1.2/trac/htdocs/js/threaded_comments.js?marks=50-76#L50
>> > https://trac.edgewall.org/ticket/11835
>>
>> I do not see this. I can hoover the mouse all over the place. The
>> buttons do not show up. Period. Unless I remover the visibility:
>> hidden; text from the ticket.css file.
>
>
> It's one of two things: either you aren't loading the correct JavaScript (or
> template), or there is an error in the JavaScript execution, likely due to a
> plugin conflict. I would:
>
> 1. Do the hard refresh of the page to clear cached resources, which I
> mentioned twice, but you haven't confirmed to have done.

Sorry. Yes. This was done. No difference.


> 2. Check whether you are overriding any templates, via a ticket.html (or
> possibly another ticket-related html file) in your environment templates
> directory or a shared templates directory (1). Templates are also listed on
> the /about page, in the Interface Customization section

I see this:

Site templates         site.html
Shared templates
Site static resources  latex-images ramboll_intranet.gif site.html style.css tracworkflowadmin


site.html:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      py:strip="">

  <!--! Add site-specific style sheet -->
  <head py:match="head" py:attrs="select('@*')">
    ${select('*|comment()|text()')}
    <link rel="stylesheet" type="text/css"
          href="${href.chrome('site/style.css')}" />
  </head>
</html>


site.css:

table.progress td.open { background: #0000ff }
table.progress td.closed { background: #00ff00 }
table.progress td.testing { background: #ff0000 }
table.progress td.info { background: #00ffff }


latex-images and tracworkflowadmin contain PNG images. ramboll_intranet.gif is our logo.


> 3. Check the browser console for JavaScript errors

> 4. Check that threaded_comment.js matches the file in the egg

The egg is a directory, and there is a ./Trac-1.2-py2.7.egg/trac/htdocs/js/threaded_comments.js file. Wouldn't that be the only place this file exists? I have not copied it anywhere, and I do not see a file with the same name anywhere else.


> 5. Compare the JavaScript on one of your ticket pages to that on the demo
> site (2)
>
> - Ryan
>
> (1)
> https://trac.edgewall.org/wiki/TracInterfaceCustomization#ProjectTemplates
> (2) view-source:https://trac.edgewall.org/demo-1.0/ticket/1
>
>  
>
> --
> 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 https://groups.google.com/group/trac-users.
> For more options, visit https://groups.google.com/d/optout.



--
Roger Oberholtzer

RjOllos

unread,
Jan 24, 2017, 9:44:39 PM1/24/17
to Trac Users
Did you check the browser console for errors?

What about disabling DynamicFieldsPlugin, as was found in the other thread?

- Ryan

Roger Oberholtzer

unread,
Jan 25, 2017, 1:46:34 AM1/25/17
to trac-...@googlegroups.com
> Did you check the browser console for errors?

I see this in Firefox:

Error: Syntax error, unrecognized expression: *[@id] jquery.js:2:12731

The jquery.js is the one that comes with trac 1.2. I don't see that
exact same text in jquery.js. So I guess it is a variable that is
causing the problem. I see this on every Trac page.

> What about disabling DynamicFieldsPlugin, as was found in the other thread?

I'm not using that Plugin



--
Roger Oberholtzer

RjOllos

unread,
Jan 25, 2017, 2:01:17 AM1/25/17
to Trac Users


On Tuesday, January 24, 2017 at 10:46:34 PM UTC-8, Roger Oberholtzer wrote:
> Did you check the browser console for errors?

I see this in Firefox:

Error: Syntax error, unrecognized expression: *[@id]  jquery.js:2:12731

The jquery.js is the one that comes with trac 1.2. I don't see that
exact same text in  jquery.js. So I guess it is a variable that is
causing the problem. I see this on every Trac page.

Which plugins do you have installed?

Do you have SectionEditPlugin installed? If so, you need to update to the latest.

- Ryan

Roger Oberholtzer

unread,
Jan 25, 2017, 2:16:48 AM1/25/17
to trac-...@googlegroups.com


On Wed, Jan 25, 2017 at 8:01 AM, RjOllos <rjo...@gmail.com> wrote:
>
>
> On Tuesday, January 24, 2017 at 10:46:34 PM UTC-8, Roger Oberholtzer wrote:
>>
>> > Did you check the browser console for errors?
>>
>> I see this in Firefox:
>>
>> Error: Syntax error, unrecognized expression: *[@id]  jquery.js:2:12731
>>
>> The jquery.js is the one that comes with trac 1.2. I don't see that
>> exact same text in  jquery.js. So I guess it is a variable that is
>> causing the problem. I see this on every Trac page.
>
>
> Which plugins do you have installed?

The install is new. Most all plugins are from within the last week or so. I don't have all the needed plugins in place yet. I am stepping through them to see which ones work.

Trac                    1.2
Babel                   2.3.4
Docutils                0.12
Genshi                  0.7 (with speedups)
mod_python              3.5.0-none=none
Pygments                2.1.3
pysqlite                2.8.1
Python                  2.7.13 (default, Jan 03 2017, 17:41:54) [GCC]
pytz                    2016.4
setuptools              28.3.0
SQLite                  3.16.2
Subversion              1.9.5 (r1770682)


AllAttachmentsMacro     N/A
CodeExampleMacro        1.2.post0
FootNoteMacro           1.5
graphviz                0.7.7dev-r0
GridModify              1.0.0.dev0
Latex                   0.1.post0
NoteBox                 1.0.post0
PlannedMilestones       N/A    
ticketsboardplugin      1.2.2-trac0.12
TracCollapsiblePlugin   0.1
TracDiscussion          1.2.dev0      
TracDownloads           1.0.0.dev0
TracDynamicFields       2.2.0
TracHtmlNotificationPlugin      0.12.0.1
TracIncludeMacro        3.0.0.dev0
TracMasterTickets       4.0.0.dev0
TracSectionEditPlugin   0.2.6.post0
TracTags                0.10.dev0
TracTicketTemplate      1.0.dev0
TracWorkflowAdmin       0.12.0.3
TracWysiwyg             0.12.0.5
WeekPlan                1.3

~                            


>
> Do you have SectionEditPlugin installed? If so, you need to update to the
> latest.
> https://trac-hacks.org/ticket/12721

Not installed yet. But I do plan on adding it back soon.

--
Roger Oberholtzer

Roger Oberholtzer

unread,
Jan 25, 2017, 2:18:18 AM1/25/17
to trac-...@googlegroups.com
No morning coffee yet. I DO have section edit installed. Sorry about that. I will update it.
--
Roger Oberholtzer

Roger Oberholtzer

unread,
Jan 25, 2017, 2:27:22 AM1/25/17
to trac-...@googlegroups.com
Updated to current (which I think was already installed) and it made no difference.

The reason I was thinking it was not installed is that I do not get the edit icon in wiki pages to do a section edit. So that's another thing not working...

--
Roger Oberholtzer

Ryan Ollos

unread,
Jan 25, 2017, 2:31:00 AM1/25/17
to trac-...@googlegroups.com
Did you do a hard refresh after updating to clear cached resources in your browser? 

Roger Oberholtzer

unread,
Jan 25, 2017, 2:41:29 AM1/25/17
to trac-...@googlegroups.com
That and restarting the apache server.




--
Roger Oberholtzer

RjOllos

unread,
Jan 25, 2017, 2:52:46 AM1/25/17
to Trac Users
I'd disable SectionEditPlugin. If that doesn't fix the problem, I'd disable all plugins and add them back one by one until you the issue occurs.

Roger Oberholtzer

unread,
Jan 25, 2017, 3:51:15 AM1/25/17
to trac-...@googlegroups.com
Disabling the SectionEdit plugin did make a difference. A number of other things that had not been working are now working as well.

But we're not there yet.

Now, when I move the mouse over the comment text, the buttons appear below. Unfortunately, when I move the mouse to select one of the buttons, they disappear before I can get to them...



--
Roger Oberholtzer

Roger Oberholtzer

unread,
Jan 25, 2017, 4:43:13 AM1/25/17
to trac-...@googlegroups.com
I think it could be that if the comment is only about property changes, but there is no text, this happens. I suspect that the text box when there is text changes what is available to hoover over in such a way that the buttons stay. Without the text box there is less to hoover over...
--
Roger Oberholtzer

Ryan Ollos

unread,
Jan 25, 2017, 12:31:18 PM1/25/17
to trac-...@googlegroups.com
On Wed, Jan 25, 2017 at 1:43 AM Roger Oberholtzer <roger.ob...@gmail.com> wrote:
I think it could be that if the comment is only about property changes, but there is no text, this happens. I suspect that the text box when there is text changes what is available to hoover over in such a way that the buttons stay. Without the text box there is less to hoover over...


There's an open ticket for the issue and it will be fixed in 1.2.1:


- Ryan 

Roger Oberholtzer

unread,
Jan 25, 2017, 12:39:44 PM1/25/17
to trac-...@googlegroups.com
Great! After disabling SectionEdit, Trac 1.2 is the Trac I have grown to like.

I look forward the the Notification part expanding. If I was a Python programmer, I could consider helping. But I'm a C/Tcl/Tk sort of guy...

Thanks for your help. It has been greatly appreciated.

--
Roger Oberholtzer

RjOllos

unread,
Jan 25, 2017, 2:54:38 PM1/25/17
to Trac Users

Np, if you ever find time to get more involved in development, I'm happy to help anyone that wants help to get going with development:
https://groups.google.com/d/msg/trac-users/mchL9JjQ-IA/My-QNOBpCAAJ

- Ryan
 
Reply all
Reply to author
Forward
0 new messages