TracTicketTemplatePlugIn

133 views
Skip to first unread message

ONeal Freeman

unread,
Mar 5, 2014, 11:45:52 AM3/5/14
to trac-...@googlegroups.com
Hello,
I have recently installed Trac 1.0.1-1 on windows with BitNami. I have added the TracTicketTemplatePlugIn but cannot get it to work. I can see that the table, tt_template_store, is included in the trac.db and populated with the default descriptions for each ticket type but I have thus far been unable to get it to work. I am positive I am missing something. I think I have read every entry on the internet about this plug-in without finding the answer. Do anyone have an idea what it is I am missing?

Thanks in advance for your help.

RjOllos

unread,
Mar 5, 2014, 11:52:28 AM3/5/14
to trac-...@googlegroups.com
1. Check that you've installed the latest, version 0.8, of TracTicketTemplatePlugIn: https://groups.google.com/d/msg/trac-users/jJ232JcnB1U/WOHWVG6e6XcJ
2. Make sure the plugin is loading. Does it appear in the plugins section of the web admin page? Set TracLogging to debug and look for loading or error messages when restarting tracd or your web server.
3. If the plugin is loading correctly, then look in the browser console for JavaScript error messages.
  

ONeal Freeman

unread,
Mar 5, 2014, 12:35:31 PM3/5/14
to trac-...@googlegroups.com
Thank you for the quick reply RjOllos! I can see in the log where the plugin is loading and it also shows up in the admin - plugins section as v0.8.

These two lines are in the log but I do not see the listed .js in the folders under my project.
2014-03-05 11:26:21,532 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/chrome/tt/json2.js'">
2014-03-05 11:26:21,815 Trac[session] DEBUG: Retrieving session for ID u'duser'
2014-03-05 11:26:21,839 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/tt/tt_newticket.js'">

Is that perhaps the issue?

RjOllos

unread,
Mar 5, 2014, 12:59:17 PM3/5/14
to trac-...@googlegroups.com
On Wednesday, March 5, 2014 9:35:31 AM UTC-8, ONeal Freeman wrote:
Thank you for the quick reply RjOllos! I can see in the log where the plugin is loading and it also shows up in the admin - plugins section as v0.8.

These two lines are in the log but I do not see the listed .js in the folders under my project.
2014-03-05 11:26:21,532 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/chrome/tt/json2.js'">
2014-03-05 11:26:21,815 Trac[session] DEBUG: Retrieving session for ID u'duser'
2014-03-05 11:26:21,839 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/tt/tt_newticket.js'">

Is that perhaps the issue?

ONeal Freeman

unread,
Mar 5, 2014, 2:18:00 PM3/5/14
to trac-...@googlegroups.com
Ran trac-admin deploy as suggested. It did put a lot of items in the htdocs folder including quite a few js files, but that did not fix the problem.

RjOllos

unread,
Mar 5, 2014, 2:40:25 PM3/5/14
to trac-...@googlegroups.com


On Wednesday, March 5, 2014 11:18:00 AM UTC-8, ONeal Freeman wrote:
Ran trac-admin deploy as suggested. It did put a lot of items in the htdocs folder including quite a few js files, but that did not fix the problem.

Previously you said "I do not see the listed .js in the folders under my project". Does that mean that you can locate the resources after the page loads? For example, "view the page source" and the follow the links to those resources; do they load in the browser? 

RjOllos

unread,
Mar 5, 2014, 2:43:16 PM3/5/14
to trac-...@googlegroups.com
Type: I meant to say "Does that mean that you can't locate the resources after the page loads?" 

ONeal Freeman

unread,
Mar 5, 2014, 2:59:37 PM3/5/14
to trac-...@googlegroups.com
I meant I did not find any .js files under my project folders.

I just viewed the newticket source code and it shows:
<script type="text/javascript" src="/trac/tmg/chrome/tt/json2.js"></script>

I do not have an actual /chrome folder.

I do appreciate your help. As you have determined by now I am a newbie with this. I was tasked to migrate trac .10.4 from a linux server to a windows server. I have been working on it for a month.

RjOllos

unread,
Mar 5, 2014, 3:05:21 PM3/5/14
to trac-...@googlegroups.com
On Wednesday, March 5, 2014 11:59:37 AM UTC-8, ONeal Freeman wrote:
I meant I did not find any .js files under my project folders.

I just viewed the newticket source code and it shows:
<script type="text/javascript" src="/trac/tmg/chrome/tt/json2.js"></script>

I do not have an actual /chrome folder.

I do appreciate your help. As you have determined by now I am a newbie with this. I was tasked to migrate trac .10.4 from a linux server to a windows server. I have been working on it for a month.

No problem. If it makes you feel better, I don't really know anything either, but hopefully have been on the forum long enough to know a few debug steps ;)

The /chrome path doesn't map directly to a chrome directory on the file system.

if you click on the /trac/tmg/chrome/tt/json2.js link, does the JavaScript source file load in the browser?

ONeal Freeman

unread,
Mar 5, 2014, 3:07:07 PM3/5/14
to trac-...@googlegroups.com
If I click the link in the view source it does open the json2.js file.

ONeal Freeman

unread,
Mar 5, 2014, 3:13:16 PM3/5/14
to trac-...@googlegroups.com
I am trying to get this to work so I can add a multilined default compliance sections in the ticket description box so as we write up issues we are reminded to annotate any compliance issues.

I initially tried the instructions at 


trying to use the site.html to add the default description but didn't have any luck with that either.


On Wednesday, March 5, 2014 2:05:21 PM UTC-6, RjOllos wrote:

RjOllos

unread,
Mar 5, 2014, 3:18:26 PM3/5/14
to trac-...@googlegroups.com
On Wednesday, March 5, 2014 12:13:16 PM UTC-8, ONeal Freeman wrote:
I am trying to get this to work so I can add a multilined default compliance sections in the ticket description box so as we write up issues we are reminded to annotate any compliance issues.

I initially tried the instructions at 


trying to use the site.html to add the default description but didn't have any luck with that either.

Do you find the following when viewing the New Ticket page source?

<script src="/tracdev/tt/tt_newticket.js" type="text/javascript">

You can use [ticket] default_description if you are okay with having the same description for every ticket type.
If not, then you need a plugin such as TracTicketTemplatePlugin 

ONeal Freeman

unread,
Mar 5, 2014, 3:26:38 PM3/5/14
to trac-...@googlegroups.com
Yes the line:

<script src="/trac/tmg/tt/tt_newticket.js" type="text/javascript">

is at the very end of the source code.
Message has been deleted

RjOllos

unread,
Mar 5, 2014, 3:39:46 PM3/5/14
to trac-...@googlegroups.com
On Wednesday, March 5, 2014 12:26:38 PM UTC-8, ONeal Freeman wrote:
Yes the line:

<script src="/trac/tmg/tt/tt_newticket.js" type="text/javascript">

is at the very end of the source code.

Can you see the JavaScript source if you append /trac/tmg/tt/tt_newticket.js to your base URL and navigate to that address? 

ONeal Freeman

unread,
Mar 5, 2014, 7:02:31 PM3/5/14
to trac-...@googlegroups.com
I appended onto my base url and the script did open

RjOllos

unread,
Mar 6, 2014, 1:21:41 AM3/6/14
to trac-...@googlegroups.com
On Wednesday, March 5, 2014 4:02:31 PM UTC-8, ONeal Freeman wrote:
I appended onto my base url and the script did open

I think we've established that:
 - The plugin is loading. 
 - The scripts are being added to the page.

What about the browser console? Do you see any errors when refreshing the page?

ONeal Freeman

unread,
Mar 6, 2014, 11:33:55 AM3/6/14
to trac-...@googlegroups.com
I called trac up in IE so I could see any errors on the status bar.

I have this error:
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
Timestamp: Thu, 6 Mar 2014 16:32:40 UTC


Message: 'auto_preview_timeout' is undefined
Line: 18
Char: 5
Code: 0

RjOllos

unread,
Mar 6, 2014, 4:20:51 PM3/6/14
to trac-...@googlegroups.com
On Thursday, March 6, 2014 8:33:55 AM UTC-8, ONeal Freeman wrote:
I called trac up in IE so I could see any errors on the status bar.

I have this error:
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
Timestamp: Thu, 6 Mar 2014 16:32:40 UTC


Message: 'auto_preview_timeout' is undefined
Line: 18
Char: 5
Code: 0

What value do you have in trac.ini for [trac] auto_preview_timeout? 

RjOllos

unread,
Mar 6, 2014, 5:09:52 PM3/6/14
to trac-...@googlegroups.com
Also:

Which browser have you been experiencing this behavior in?

Do you have any other plugins installed? We should consider: http://trac-hacks.org/ticket/7344

I pushed a minor fix for TracTicketTemplatePlugin just now. It probably won't fix your issue, but it is worth updating to 0.9dev-r13727 to give it a try.

ONeal Freeman

unread,
Mar 7, 2014, 11:07:16 AM3/7/14
to trac-...@googlegroups.com
I don't have any value in my ini for the timeout.

ONeal Freeman

unread,
Mar 7, 2014, 11:10:41 AM3/7/14
to trac-...@googlegroups.com
I am using both Chrome and IE8. 

Installed plugins are:

RjOllos

unread,
Mar 7, 2014, 2:17:18 PM3/7/14
to trac-...@googlegroups.com
On Friday, March 7, 2014 8:10:41 AM UTC-8, ONeal Freeman wrote:
I am using both Chrome and IE8. 

Installed plugins are:

The issue with auto_preview_timeout is confusing because it should default to 2.0 when the option is not present in trac.ini, and to 0.0 when the value is blank in trac.ini. I'm not sure that is related in any way to the issue with TracTicketTemplatePlugin, however you might try setting it to 2.0:
[trac]
auto_preview_timeout = 2.0

Does the auto preview functionality work? If you type a few characters in the ticket summary or description, do you automatically get a preview either immediately or after 2 seconds?

As far as debugging TracTicketTemplatePlugin, I would suggest that you open the browser console and try to execute:
$("body").tt_newticket(); 
What is the result?

ONeal Freeman

unread,
Mar 7, 2014, 2:33:20 PM3/7/14
to trac-...@googlegroups.com
Typing into the summary and description I do not have a preview of any kind.

Entering $("body").tt_newticket();  into the browser just looks up the statement in google. I am guessing that when you said browser console your meant IE address bar?

RjOllos

unread,
Mar 7, 2014, 2:39:22 PM3/7/14
to trac-...@googlegroups.com
On Friday, March 7, 2014 11:33:20 AM UTC-8, ONeal Freeman wrote:
Typing into the summary and description I do not have a preview of any kind.

Please let me know what you find after setting a value for the timeout.
 
Entering $("body").tt_newticket();  into the browser just looks up the statement in google. I am guessing that when you said browser console your meant IE address bar?

To get to the browser console in IE press F12 to open developer tools, and you should then see a tab labeled Console.

In Chrome, CTRL + SHIFT + I opens the developer tools. 

ONeal Freeman

unread,
Mar 7, 2014, 3:19:36 PM3/7/14
to trac-...@googlegroups.com
I had no idea that the console existed...

When I entered the statement i got the following:
TypeError: Object #<HTMLBodyElement> has no method 'tt_newticket'

ONeal Freeman

unread,
Mar 7, 2014, 3:21:15 PM3/7/14
to trac-...@googlegroups.com
Also after setting the auto_preview_timeout in trac.ini nothing changes. I do not have a preview on a new ticket.


On Friday, March 7, 2014 1:39:22 PM UTC-6, RjOllos wrote:

RjOllos

unread,
Mar 7, 2014, 3:26:11 PM3/7/14
to trac-...@googlegroups.com
On Friday, March 7, 2014 12:19:36 PM UTC-8, ONeal Freeman wrote:
I had no idea that the console existed...

When I entered the statement i got the following:
TypeError: Object #<HTMLBodyElement> has no method 'tt_newticket'

We must not have been talking about the same thing earlier when I asked if there are any error messages in the console on page load.

With the console open, when you reload the page, what is the output in the console? 

RjOllos

unread,
Mar 7, 2014, 4:09:18 PM3/7/14
to trac-...@googlegroups.com
I will be very surprised if you don't find some errors from the TracTicketTemplatePlugin's JavaScript reported to the console on page load. With any luck, that will point us directly at the problem. 

ONeal Freeman

unread,
Mar 7, 2014, 7:47:48 PM3/7/14
to trac-...@googlegroups.com
I opened the console and entered $("body").tt_newticket();

When I opened the newticket I saw the error:
  1. Uncaught ReferenceError: auto_preview_timeout is not defined auto_preview.js:18
    1. $.fn.autoSubmitauto_preview.js:18
    2. (anonymous function)newticket:24
    3. p.fireWithjquery.js:2
    4. e.extend.readyjquery.js:2
    5. c.addEventListener.B

I got on the line I entered and did a hard return in the console and got:
$("body").tt_newticket();
undefined
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

I then changed the type to a different option and was asked if I wanted to 'Replace current content with ticket template?'. I answered yes to the prompt and the content changed to what I had added to the tt_ticket_store via the tickettemplateplugin.

ONeal Freeman

unread,
Mar 7, 2014, 7:53:32 PM3/7/14
to trac-...@googlegroups.com
I opened my trac.log again and anything with mimeview is being skipped.

You may have to look below for my last post. I think I may have replied to myself...

RjOllos

unread,
Mar 7, 2014, 8:31:11 PM3/7/14
to trac-...@googlegroups.com
On Friday, March 7, 2014 4:53:32 PM UTC-8, ONeal Freeman wrote:
I opened my trac.log again and anything with mimeview is being skipped.

Some mimeview components may be skipped if you don't have dependencies such as Pygments and docutils installed. It is probably not related to the issue with TracTicketTemplatePlugin.

I'm not sure what could be causing the auto_preview_timeout error, but if changing the ticket type always results in the template being applied after the initial page load, then I have to think that the auto_preview_timeout might be related to the problem you are experiencing.

RjOllos

unread,
Mar 8, 2014, 6:27:04 AM3/8/14
to trac-...@googlegroups.com
You could try temporarily disabling all your plugins (except TracTicketTemplatesPlugin) just to see if the auto preview and ticket templates start working. 

RjOllos

unread,
Mar 8, 2014, 6:28:12 AM3/8/14
to trac-...@googlegroups.com
One other thought. Does the auto preview functionality for wiki pages function correctly when in side-by-side edit mode? 

ONeal Freeman

unread,
Mar 8, 2014, 8:15:13 AM3/8/14
to trac-...@googlegroups.com
This was the first time that changing ticket type displayed the template description and that only happen after a hard return on the console error line.

ONeal Freeman

unread,
Mar 8, 2014, 8:22:36 AM3/8/14
to trac-...@googlegroups.com
I disabled all plugins which was a mistake on my part. After disabling the acctmgr I no longer have a login link or a new ticket link... I do not know how to get them back.

ONeal Freeman

unread,
Mar 8, 2014, 5:08:05 PM3/8/14
to trac-...@googlegroups.com
I opened the console and watched for the auto_preview_timeout error but nothing I selected called the auto_preview.js.

I tired to set the var auto_preview_timeout in the js but it did not work, not the way I had it anyway.

RjOllos

unread,
Mar 10, 2014, 2:48:49 AM3/10/14
to trac-...@googlegroups.com
On Saturday, March 8, 2014 2:08:05 PM UTC-8, ONeal Freeman wrote:
I opened the console and watched for the auto_preview_timeout error but nothing I selected called the auto_preview.js.

I tired to set the var auto_preview_timeout in the js but it did not work, not the way I had it anyway.

It's very difficult to determine which questions you are responding to when you reply at the top of the email. I kindly ask that you respond after the question, as you'll see that I've been doing. The behavior will be appreciated by the other members in any forum that you participate in. 

I'd like to be more specific with regard to the following question "Does the auto preview functionality for wiki pages function correctly when in side-by-side edit mode? "

 1. Set [trac] auto_preview_timeout to 1.0 or 2.0.
 2. Navigate to the /about page to confirm that you see a value set.















 3. Navigate to a wiki page and press Edit this page.
 4. Select the "Edit side-by-side" checkbox to put the page in side-by-side edit mode.
 5. Once the page auto-refreshes and you are in side-by-side edit mode, type a few character in the edit box and see if the right side auto-refreshes to show a preview. If it does not, then repeat the edit steps with the console open to see if any errors appear in the console.

Prior to all that, I suggest trying to clear your browser cache just to see if that fixes the problem.

ONeal Freeman

unread,
Mar 10, 2014, 9:55:08 AM3/10/14
to trac-...@googlegroups.com
Sorry about the bad postings...

I cleared browser cache but that did not make a difference.

The about page does show auto_preview_timeout as 2.0

I edited a wiki page in side-by-side and the changes were not shown in the preview side.

I then opened the console and performed the wiki edit again.but the same error was displayed: Uncaught ReferenceError: auto_preview_timeout is not defined

Steffen Hoffmann

unread,
Mar 10, 2014, 2:41:27 PM3/10/14
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

btw, both of you are NOT the only people reading on this list. It might
be, that Ryan is very active and often a bit earlier with responses, so
I (and maybe others) do not interfere, as long as I can't see what to do
more.

As Ryan declared he would run low of ideas I step in now, but don't
promise to do any better though.

On 10.03.2014 14:55, ONeal Freeman wrote:
> I cleared browser cache but that did not make a difference.
>
> The about page does show auto_preview_timeout as 2.0
>
> I edited a wiki page in side-by-side and the changes were not shown in
> the preview side.
>
> I then opened the console and performed the wiki edit again.but the same
> error was displayed: Uncaught ReferenceError: auto_preview_timeout is
> not defined

I remember your report from earlier test with console interaction. I'm
quite sure, that there is an issue with Trac core wiki preview rendering
or interference between that and the ticket template plugin. As I do use
Trac with that plugin and I know that both can work flawlessly I'm most
anxious to see this case resolved. I feel that the auto-preview blocks
the plugin from working properly, but I cannot see yet how to nail it down.

Could you try to kind of refresh your Trac install to make sure it is
really complete? Never heard of a similar issue with for the whole
lifetime of this great feature, so I tend to believe it is a local
installation issue. The configuration is already confirmed to be ok by
you feedback.

Steffen Hoffmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlMeB1IACgkQ31DJeiZFuHezBwCgsZDJruj8Z1lsymInGyD3BmR8
o/4An23p06FoanZdtqu3h9paI/7IijH0
=uLlU
-----END PGP SIGNATURE-----

ONeal Freeman

unread,
Mar 10, 2014, 2:53:51 PM3/10/14
to trac-...@googlegroups.com
Hello  Steffen,

I removed trac from my test machine and reinstalled with the same issue still there.

I also have this same install on a server but I do not do any testing on the server. As I get issues sorted out I make the changes to the server.

Something I have not mentioned to Ryan is that my site.html does not include macros.html. I had read where macros.html will be eliminated from trac very soon. Is it possible that I am missing a important function which may be contained in the macros.html?

Regards,
O'Neal

Steffen Hoffmann

unread,
Mar 10, 2014, 4:41:42 PM3/10/14
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10.03.2014 19:53, ONeal Freeman wrote:
> Something I have not mentioned to Ryan is that my site.html does not
> include macros.html. I had read where macros.html will be eliminated
> from trac very soon. Is it possible that I am missing a important
> function which may be contained in the macros.html?

Good, that you mention such things, but the script files in question do
not get included by templates statements but by explicit function calls
('add_script()' from trac.web.chrome) instead.

The script containing the auto-preview js function may even load, but
not get interpreted properly. I thought of a jQuery clash or similar,
but neither have I looked at the corresponding Trac core code nor do I
feel like a JS guru to spot issues in JS code easily.

Anyway, because it works for Ryan, me and any others, we'll have to get
it working for you too. More ideas, anyone? :-)

Steffen Hoffmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlMeI4QACgkQ31DJeiZFuHfK+ACfQUDTyALrMZkPHPhDLHQzfKyn
XGUAnA0cCN7E4hvDsScpTHxsTkrdOTQm
=IyCo
-----END PGP SIGNATURE-----

RjOllos

unread,
Mar 10, 2014, 4:51:06 PM3/10/14
to trac-...@googlegroups.com
On Monday, March 10, 2014 1:41:42 PM UTC-7, hasienda wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10.03.2014 19:53, ONeal Freeman wrote:
> Something I have not mentioned to Ryan is that my site.html does not
> include macros.html. I had read where macros.html will be eliminated
> from trac very soon. Is it possible that I am missing a important
> function which may be contained in the macros.html?

Good, that you mention such things, but the script files in question do
not get included by templates statements but by explicit function calls
('add_script()' from trac.web.chrome) instead.

The script containing the auto-preview js function may even load, but
not get interpreted properly. I thought of a jQuery clash or similar,
but neither have I looked at the corresponding Trac core code nor do I
feel like a JS guru to spot issues in JS code easily.

Anyway, because it works for Ryan, me and any others, we'll have to get
it working for you too. More ideas, anyone? :-)

I was thinking of testing out the Bitnami distribution, but if you (Steffen) have given it a try already and it is working okay for you, I might put that off a bit longer.

Perhaps we need to see take a look at the full log file at DEBUG level, for a session that spans restarting the web server to navigating to the /newticket page.

Steffen Hoffmann

unread,
Mar 10, 2014, 5:11:38 PM3/10/14
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10.03.2014 21:51, RjOllos wrote:
> Perhaps we need to see take a look at the full log file at DEBUG level,
> for a session that spans restarting the web server to navigating to the
> /newticket page.

Indeed this was/is what I've been thinking too, more debut logging, please.

Steffen Hoffmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlMeKocACgkQ31DJeiZFuHdL0ACePEb2uKb/itt4OzS45NmD/uPr
zZsAn3desUAVEGznAnYIN5NKv0hgfslt
=4+cZ
-----END PGP SIGNATURE-----

ONeal Freeman

unread,
Mar 10, 2014, 6:01:33 PM3/10/14
to trac-...@googlegroups.com
So let me see if I understand what you want me to do with the debug log.
Start trac and then restart the web server (apache) without exiting trac. Refresh trac and navigate to newticket? 

Steffen Hoffmann

unread,
Mar 10, 2014, 6:40:27 PM3/10/14
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10.03.2014 23:01, ONeal Freeman wrote:
> On Monday, March 10, 2014 4:11:38 PM UTC-5, hasienda wrote:
>> On 10.03.2014 21:51, RjOllos wrote:
>>> Perhaps we need to see take a look at the full log file at DEBUG
>>> level,
>>> for a session that spans restarting the web server to navigating
>>> to the
>>> /newticket page.
>>
>> Indeed this was/is what I've been thinking too, more debut logging,
>> please.
>
> So let me see if I understand what you want me to do with the debug log.
> Start trac and then restart the web server (apache) without exiting
> trac. Refresh trac and navigate to newticket?

Just restart the server, that is providing dynamic Trac content.
Capture the log from after restart up to the end of the first request,
that shall target /newticket directly. It will show a full Trac
environment reload and the request itself. A browser refresh would only
lengthen the log without providing additional information.

Steffen Hoffmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlMeP1gACgkQ31DJeiZFuHe00gCglbxpHY+CRYFvKPigeKUa2CQK
eYQAoIzHEerdGdDSrxv4JfkZdVeOZ27b
=ogY/
-----END PGP SIGNATURE-----

Bill Hernandez

unread,
Mar 10, 2014, 9:56:06 PM3/10/14
to trac-...@googlegroups.com

Ever since I upgraded to OS X 10.9 a few days ago, I keep getting the error block below

I upgraded to the latest tracd

$ tracd --version
tracd 1.0.1

Any ideas ?

Bill Hernandez
Plano, Texas



Server starting in PID 530.
Serving on 0.0.0.0:8000 view at http://127.0.0.1:8000/
Using HTTP/1.1 protocol version

127.0.0.1 - - [10/Mar/2014 20:43:36] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [10/Mar/2014 20:43:36] "GET / HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 49205)
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 593, in process_request_thread
    self.finish_request(request, client_address)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 651, in __init__
    self.finish()
  File "build/bdist.macosx-10.8-intel/egg/trac/web/wsgi.py", line 196, in finish
    BaseHTTPRequestHandler.finish(self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 710, in finish
    self.wfile.close()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 279, in close
    self.flush()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
————————————————————

RjOllos

unread,
Mar 11, 2014, 3:42:56 AM3/11/14
to trac-...@googlegroups.com
You've replied to an existing thread with an ongoing discussion, which can result in very confusing situation. We kindly ask that you create a new thread.

Are you sure that you've built Trac against your upgraded installation? The path shows "build/bdist.macosx-10.8-intel/egg/trac/web/wsgi.py". Maybe that's egg for your earlier version of Trac and you need to remove it.  

ONeal Freeman

unread,
Mar 11, 2014, 9:21:23 AM3/11/14
to trac-...@googlegroups.com
I have attached my trac.log
 
trac.log

RjOllos

unread,
Mar 11, 2014, 10:03:49 AM3/11/14
to trac-...@googlegroups.com
I don't see anything obvious so far. Could you try upgrading to TracTicketTemplatePlugin 0.9dev though? It appears you are still running 0.8.

ONeal Freeman

unread,
Mar 11, 2014, 10:25:48 AM3/11/14
to trac-...@googlegroups.com
Now I am going to show your how much I don't know about trac. I tried using easy_install to download the template version and couldn't it. So I downloaded the source and created the egg. The source I downloaded and build was under 0.11.

Please point me in the direction to get the latest. 
 

RjOllos

unread,
Mar 11, 2014, 10:34:38 AM3/11/14
to trac-...@googlegroups.com
You can upgrade by executing:

and then restarting your webserver.

When testing the latest version, it would be best to clear your browser cache and do a hard-refresh of the page (hold down SHIFT while clicking the refresh button).
 

ONeal Freeman

unread,
Mar 11, 2014, 10:49:22 AM3/11/14
to trac-...@googlegroups.com
Got an error trying to upgrade:    
File "c:\bitnami\trac-1.0.1-1\python\lib\setuptools-0.6c11-py2.7.egg\setuptools\command\egg_info.py", line 233, in get_svn_revision
IndexError: list index out of range
 

RjOllos

unread,
Mar 11, 2014, 11:14:10 AM3/11/14
to trac-...@googlegroups.com
That's a setuptools + SVN 1.7 issue which can be solved by upgrading setuptools.

If you don't want to upgrade setuptools, then probably the easiest way to proceed is:
 2. Change to the 0.11 directory and run easy_install  

ONeal Freeman

unread,
Mar 11, 2014, 12:21:29 PM3/11/14
to trac-...@googlegroups.com
Not sure if this will help but attached my about page 
About Trac.htm

RjOllos

unread,
Mar 11, 2014, 12:54:43 PM3/11/14
to trac-...@googlegroups.com
It looks like you have the latest setuptools (3.1). Did you upgrade just now?

I think that someone previously suggested the SVN 1.7 issues should have been fixed in setuptool 1.2:

Anyway, did you try installing per the steps suggested in my previous message? 

ONeal Freeman

unread,
Mar 11, 2014, 2:01:20 PM3/11/14
to trac-...@googlegroups.com
After I download and installed templateplugin as per your instructions  I went back and also upgrade setup tools. 

RjOllos

unread,
Mar 11, 2014, 4:16:22 PM3/11/14
to trac-...@googlegroups.com

What was the result? Any change in behavior?

ONeal Freeman

unread,
Mar 11, 2014, 8:07:25 PM3/11/14
to trac-...@googlegroups.com
Unfortunately no change. Console still shows timeout not defined. 

RjOllos

unread,
Mar 11, 2014, 8:51:32 PM3/11/14
to trac-...@googlegroups.com
Do you think it's possible that you have an older version of Trac on your Python search path? It doesn't seem likely since the proper version of Trac is displayed on the about page, but we are running out of things to check.

ONeal Freeman

unread,
Mar 11, 2014, 8:55:29 PM3/11/14
to trac-...@googlegroups.com
My trac.pth does contain two lines:
C:\\BitNami\\trac-1.0.1-1\\apps\\trac\\Lib\\site-packages\\Trac-1.0.1-py2.7.egg
C:\\BitNami\\trac-1.0.1-1\\apps\\trac\\Lib\\site-packages\\Trac-1.1.2dev-py2.7.egg

RjOllos

unread,
Mar 11, 2014, 9:10:34 PM3/11/14
to trac-...@googlegroups.com

 I think it would be worth trying to remove "Trac-1.1.2dev-py2.7.egg" from trac.pth and delete the egg. Restart the web server before testing again.

ONeal Freeman

unread,
Mar 11, 2014, 9:20:33 PM3/11/14
to trac-...@googlegroups.com
I removed the line but didn't find the egg. I searched the drive for the egg but didn't find it. 

RjOllos

unread,
Mar 11, 2014, 9:31:19 PM3/11/14
to trac-...@googlegroups.com
Have you tried doing a reinstall of Bitnami yet?

Make sure to backup your Trac environment directory in case something goes wrong in the process. 

If the Trac environment resides outside of C:\BitNami, you could just delete the BitNami directory after uninstalling, just to be sure.

ONeal Freeman

unread,
Mar 12, 2014, 9:19:06 AM3/12/14
to trac-...@googlegroups.com
I have done exactly as you instructed above once all ready. Yes my trac env is outside the bitnami.

Do you think I should try a manual install instead of using bitnami? 

ONeal Freeman

unread,
Mar 12, 2014, 9:31:40 AM3/12/14
to trac-...@googlegroups.com
Does it matter that my trac.conf (attached) has a section mod_python? 
trac.conf

RjOllos

unread,
Mar 12, 2014, 9:44:50 AM3/12/14
to trac-...@googlegroups.com
Well, maybe hold off on the manual install a short while longer. Let me do some testing with Bitnami. What OS are you running?

 

RjOllos

unread,
Mar 12, 2014, 9:46:19 AM3/12/14
to trac-...@googlegroups.com
On Wednesday, March 12, 2014 6:31:40 AM UTC-7, ONeal Freeman wrote:

Does it matter that my trac.conf (attached) has a section mod_python? 

That shouldn't matter since the section is commented out. 

ONeal Freeman

unread,
Mar 12, 2014, 9:50:10 AM3/12/14
to trac-...@googlegroups.com
 win 7

ONeal Freeman

unread,
Mar 12, 2014, 11:10:31 AM3/12/14
to trac-...@googlegroups.com
attached trac.wsgi 
trac.wsgi

RjOllos

unread,
Mar 15, 2014, 7:19:52 PM3/15/14
to trac-...@googlegroups.com
Here is another thing to look for:

Navigate to the wiki edit page, and then view the page source (right click and select "View page source", or CTRL + U in Chrome). Near the top of the page you should see a pair of <script> tags with auto_preview_timeout and form_token, like this:

    <script type="text/javascript">
      var auto_preview_timeout=2.0;
      var form_token="1496253af684add6bfc35380";
    </script>

Is auto_preview_timeout defined there? If not, could you just send along the page source for an entire page?

Do you have any files in your environment's "templates" directory, other than "site.html.sample"?

RjOllos

unread,
Mar 15, 2014, 7:25:58 PM3/15/14
to trac-...@googlegroups.com
One other thing that's probably not related. In the logs I noticed:
2014-03-11 08:18:59,848 Trac[web_ui] DEBUG: Auth distribution skipped: tmg

From reviewing the code in AccountManager 0.4.3, the message seems to be due to an exception trapped in LoginModule_distribute_auth. I assume it is similar in the 0.3.2 version that Bitnami is still using.

Steffen, do you have any idea if the message related to anything harmful?

It might help to take a look at the trac.ini configuration, but I'd suggest focusing on the page source and template-related requests in the previous message first.

Steffen Hoffmann

unread,
Mar 15, 2014, 8:36:43 PM3/15/14
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 16.03.2014 00:25, RjOllos wrote:
> One other thing that's probably not related. In the logs I noticed:
> 2014-03-11 08:18:59,848 Trac[web_ui] DEBUG: Auth distribution skipped: tmg
>
> From reviewing the code in AccountManager 0.4.3, the message seems to be
> due to an exception trapped in LoginModule_distribute_auth. I assume it
> is similar in the 0.3.2 version that Bitnami is still using.
>
> Steffen, do you have any idea if the message related to anything harmful?

Not at all. It notices about finding another Trac env, that has
different auth_cookie setting, so it is skipped for distribution
authentication data (auth cookie information for new single-sign-on,
that has only been introduced during 0.4 development, not available in
0.3.x).

Steffen Hoffmann

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlMk8hoACgkQ31DJeiZFuHcjbwCfUI4obYBdAlgc1JP9113BHjvx
jbEAoLChiwaI1USYb0CSiJk6L6B3ldOD
=pDin
-----END PGP SIGNATURE-----

ONeal Freeman

unread,
Mar 16, 2014, 3:47:16 PM3/16/14
to trac-...@googlegroups.com
I logged in and viewed the source of the wiki start page. It does not contain any of the js references you mentioned.

I do have other files in ,y templates folder. I have the layout.html that calls the site.html. In the site.html I call a ComplianceWarning,html that adds a small text and link to the top of our new ticket window. 

RjOllos

unread,
Mar 16, 2014, 4:38:01 PM3/16/14
to trac-...@googlegroups.com
Could you try temporarily moving those files out of the templates directory, restart the web server and make sure the custom text is not present, and then see if the auto preview problem is still present?

ONeal Freeman

unread,
Mar 16, 2014, 8:47:27 PM3/16/14
to trac-...@googlegroups.com
I move all the files including site.html out of templates and the the templateplugin worked. Is it normal for it to ask if you want to replace the contents with those from the template? Also the small create-delete template windows overlaying the ticket.

RjOllos

unread,
Mar 16, 2014, 8:57:21 PM3/16/14
to trac-...@googlegroups.com
Excellent! I was starting to think we'd never solve this. I assume that the auto preview works correctly now?

Normally we don't replace layout.html. Usually only site.html is added:

If you'd like to send me those files, I can try to figure out how you can use your custom templates without breaking the other functionality.
 
Is it normal for it to ask if you want to replace the contents with those from the template?

It's normal, but the behavior is not very good:
 
Also the small create-delete template windows overlaying the ticket.

I think those will only be shown for a specific permission, such as TT_USER, so you may be able to change that behavior by adjusting the permissions.

Steffen Hoffmann

unread,
Mar 17, 2014, 6:16:29 AM3/17/14
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 17.03.2014 01:57, RjOllos wrote:
> I think those will only be shown for a specific permission, such as
> TT_USER, so you may be able to change that behavior by adjusting the
> permissions.

Correct.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlMmy3kACgkQ31DJeiZFuHf2PACdHT/WncmUeYI6kMI0x2ceKt+D
lJYAmwcf7ZzdYjyspz5ECJSOTPnne67V
=93/+
-----END PGP SIGNATURE-----

RjOllos

unread,
Mar 17, 2014, 6:33:44 AM3/17/14
to trac-...@googlegroups.com
I opened a ticket to investigate whether we can log anything that would help in similar circumstances in the future:

ONeal Freeman

unread,
Mar 17, 2014, 12:06:07 PM3/17/14
to trac-...@googlegroups.com
I do not think I replaced the layout.html but I did have to copy it into my templates folder. I am attaching my pages. 

I did take Trac live today on my server and trying to work through the bugs as they appear. We depend on it so heavily. 

If you recall I have a test machine I work on before making changes to the actual server. I have a couple of issues on my server instance that are not present on my test machine. One is that my tickets on the server show last modified 44 years ago where the test machine shows 8 weeks.

Also in the tickets from trac 0.10.4 we used the {{{ }}} around emails pasted into the comments. In trac 1.0.1 those same {{{ }}} in the comments are showing up. Again, they look fine on the test machine but not the server.

I have spent a lot of the morning comparing the plugins and the trac.ini between the test machine and server to make sure it is entirely duplicated but I am obviously missing something.
layout.html
site.html
ComplianceWarning.html

Steffen Hoffmann

unread,
Mar 17, 2014, 3:34:23 PM3/17/14
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 17.03.2014 17:06, ONeal Freeman wrote:
> I did take Trac live today on my server and trying to work through the
> bugs as they appear. We depend on it so heavily.

Dependency can push things - good, unless you start to act too hastily.

> If you recall I have a test machine I work on before making changes to
> the actual server. I have a couple of issues on my server instance that
> are not present on my test machine. One is that my tickets on the server
> show last modified 44 years ago where the test machine shows 8 weeks.

You're looking at time column content, that has not been upgrades from
POSIX seconds to microseconds correctly. This could quite easily fixed
manually, if needed, but I fear there could be more than that.

I.e. Trac 1.x totally changed the attachment file storage organization.
Did you check, that you can still open/view your old attachments?

> Also in the tickets from trac 0.10.4 we used the {{{ }}} around emails
> pasted into the comments. In trac 1.0.1 those same {{{ }}} in the
> comments are showing up. Again, they look fine on the test machine but
> not the server.

{{{ }}} is still a special character constellation. If it does not work,
there is a) something broken regarding WikiFormatting or b) content
malformed, similar to what you reported for the description ticket field
before.

> I have spent a lot of the morning comparing the plugins and the trac.ini
> between the test machine and server to make sure it is entirely
> duplicated but I am obviously missing something.

Well, it might be worth following Ryan's advice, if it is possible for
you to roll-over to that alternative import db.

Steffen Hoffmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlMnTjwACgkQ31DJeiZFuHeyxwCfY8Im+sl3LS+B0IdTaQ+rg6ii
qMoAoOgNOj+upt/PUGsecSqVJy+gvcHq
=snVr
-----END PGP SIGNATURE-----

ONeal Freeman

unread,
Mar 17, 2014, 5:10:22 PM3/17/14
to trac-...@googlegroups.com
I fixed the special characters {{{ }}} being displayed by upgrading Docutils.

The loss of the time and timechange in the db is the biggest issue. I depend on those fields to display ticket closed in last 30-, 60- and 90-days.

I have even entertained the thought of trying to install the original version (0.10.4) on windows that way at least I would have my data. 

RjOllos

unread,
Mar 18, 2014, 9:58:27 PM3/18/14
to trac-...@googlegroups.com
Regarding the templates, it seems that all you need to do is delete the "layout.html" in your environment's templates directory.

Customizations should go in site.html, or files included from site.html, as you've done with ComplianceWarning.html. You almost certainly will never need to do anything with layout.html.

Let us know if you have any other issues. Hopefully all the issues are fixed now, possibly with the exception of some reports that need to be rewritten to account for the change in timestamp format.
 

ONeal Freeman

unread,
Mar 19, 2014, 9:54:46 AM3/19/14
to trac-...@googlegroups.com
I will delete the layout.html from my environment.
 
I appreciate all of the help you and Steffen provided. You have taught me so much and I appreciate it. I put trac online yesterday and it seems to be functioning fine. I know it will need some tweaking as we get into it but that's okay.
 
I will admit that I am struggling with the queries trying to get tickets close during a period like the last 30-days. I am quite confused as to why the developers would chose to use seconds and milliseconds but who am I...
 
Thanks again for all that you did.
 
Regards,
O'Neal
 

Steffen Hoffmann

unread,
Mar 19, 2014, 2:22:34 PM3/19/14
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19.03.2014 14:54, ONeal Freeman wrote:
> I will admit that I am struggling with the queries trying to get tickets
> close during a period like the last 30-days. I am quite confused as to
> why the developers would chose to use seconds and milliseconds but who
> am I...

As you've not been involved into related issues and development, this is
a valid question. In short, we've got reports of issues with timestamps
when doing automated changes within some milliseconds while the time
resolution has been "only" seconds. I.e. it was no longer guaranteed,
that composite keys in ticket_change db table consisting of timestamp +
ticket ID were unique for each change. Accounting for future
improvements of IT equipment and making a step into safe water it was
consequent to boost time resolution by a factor of 6 - up to
microseconds, you see?

You'll make your way with adapting queries to that time stamps too. For
issues browse the mailing list first, and ask detailed questions, if
required.

Steffen Hoffmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlMp4GUACgkQ31DJeiZFuHcMOACcDAL6Odew9K/u5OA0c3E46e9r
gsIAn3NBN5rADFIUsVvasPV3/Kam30qu
=vkrY
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages