Re: [Trac] Re: "'NoneType' object is not callable" in

2018-03-16 Thread RjOllos


On Friday, March 16, 2018 at 6:39:53 AM UTC, Jun Omae wrote:
>
> Hi, 
>
> On Fri, Mar 16, 2018 at 3:03 PM, Velu Narasimman  
> wrote: 
> > I have attached screenshot of my log file showing the errors with 
> this 
> > mail. I am not sure when exactly this is occurring. But the situation 
> is, I 
> > was switching from http1.1 to http2 so had some configuration changes in 
> > apache. First I installed apache2.4.29 then installed mod_wsgi version 
> > 4.6.2. Since then I am seeing these error messages logged into log file. 
> > 
> > Now http2 is successfully working but I am still seeing these kind 
> of 
> > errors in logs. Also experienced a strange behavior of taking around 40 
> > seconds for an ajax call. Not really sure what was causing this and what 
> is 
> > the solution for this. 
>
> I guess your installed plugin(s) lead "'NoneType' object is not 
> callable" in  Please share "Installed plugins" of "About Trac" page in your Trac. 
>
> The "client connection closed" is not issue. The messages are logged 
> when client disconnected before sending all of response data. 
>
> -- 
> Jun Omae  (大前 潤) 
>


There may also be useful information in the Trac log file.
Look in the "log" directory of your Trac environment. The filename is 
trac.log by default (configurable in trac.ini).

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Trac 0.12 Hide Version based on ticket type

2018-03-09 Thread RjOllos


On Friday, March 9, 2018 at 10:57:20 AM UTC-8, G Earle wrote:
>
> Ryan,
>
> I have a very similar query as Matt (hiding Version, CC and other fields 
> for some ticket types), but am slightly confused by your answer to him. I 
> am running Trac 1.2.2 but the CondFieldsGenshi plugin is not hiding these 
> built-in fields, only my custom ticket fields.
>
> Should I expect the plugin to be working fully with the latest version of 
> Trac ?
>

Please share the [condfieldsgenshi] section from your trac.ini.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Wiki missing on new installation

2018-03-09 Thread RjOllos


On Friday, March 9, 2018 at 10:56:53 AM UTC-8, G Earle wrote:
>
> Hello,
>
> I have recently done a clean installation of Trac 1.2. on a new Windows 7 
> PC, using the *Trac-1.2.2.win32.exe* installer. There were no error 
> messages. However, having then created the local environment directory, 
> ensured it was writable, and successfully run *trac-admin 
> /path/to/myproject initenv*, I am completely missing the wiki (ie. 
> WikiStart, TracGuide, etc). Am I missing something blindingly obvious 
> please ? 
>

I can't see what would lead the default wiki pages missing. I tested the 
win32 installer on Windows 7:

C:\Users\Ryan 
Ollos\Documents\Workspace>C:\Python27-x86\Scripts\trac-admin.exe t
est initenv
Creating a new Trac environment at C:\Users\Ryan 
Ollos\Documents\Workspace\test

Trac will first ask a few questions about your environment
in order to initialize and prepare the project database.

 Please enter the name of your project.
 This name will be used in page titles and descriptions.

Project Name [My Project]>

 Please specify the connection string for the database to use.
 By default, a local SQLite database is created in the environment
 directory. It is also possible to use an existing MySQL or
 PostgreSQL database (check the Trac documentation for the exact
 connection string syntax).

Database connection string [sqlite:db/trac.db]>

Creating and Initializing Project
 Installing default wiki pages
  CamelCase imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-pa
ges\CamelCase
  InterMapTxt imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-
pages\InterMapTxt
  InterTrac imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-pa
ges\InterTrac
  InterWiki imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-pa
ges\InterWiki
  PageTemplates imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\defaul
t-pages\PageTemplates
  RecentChanges imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\defaul
t-pages\RecentChanges
  SandBox imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-page
s\SandBox
  TicketQuery imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-
pages\TicketQuery
  TitleIndex imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-p
ages\TitleIndex
  TracAccessibility imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\de
fault-pages\TracAccessibility
  TracAdmin imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-pa
ges\TracAdmin
  TracBackup imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-p
ages\TracBackup
  TracBatchModify imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\defa
ult-pages\TracBatchModify
  TracBrowser imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-
pages\TracBrowser
  TracCgi imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-page
s\TracCgi
  TracChangeLog imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\defaul
t-pages\TracChangeLog
  TracChangeset imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\defaul
t-pages\TracChangeset
  TracEnvironment imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\defa
ult-pages\TracEnvironment
  TracFastCgi imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-
pages\TracFastCgi
  TracFineGrainedPermissions imported from 
C:\Python27-x86\lib\site-packages\tra
c\wiki\default-pages\TracFineGrainedPermissions
  TracGuide imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-pa
ges\TracGuide
  TracImport imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-p
ages\TracImport
  TracIni imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-page
s\TracIni
  TracInstall imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-
pages\TracInstall
  TracInterfaceCustomization imported from 
C:\Python27-x86\lib\site-packages\tra
c\wiki\default-pages\TracInterfaceCustomization
  TracLinks imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-pa
ges\TracLinks
  TracLogging imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-
pages\TracLogging
  TracModPython imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\defaul
t-pages\TracModPython
  TracModWSGI imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-
pages\TracModWSGI
  TracNavigation imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\defau
lt-pages\TracNavigation
  TracNotification imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\def
ault-pages\TracNotification
  TracPermissions imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\defa
ult-pages\TracPermissions
  TracPlugins imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-
pages\TracPlugins
  TracQuery imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-pa
ges\TracQuery
  TracReports imported from 
C:\Python27-x86\lib\site-packages\trac\wiki\default-

[Trac] Re: How to add picture

2018-03-06 Thread RjOllos


On Tuesday, March 6, 2018 at 8:07:57 AM UTC-8, 243390...@qq.com wrote:
>
> Add a picture not as an attachment,and not use [[Image(link)]] .
> we can see it in the web.don't to click
>
>
>
Assuming you are asking how to change the image in the footer: 
https://trac.edgewall.org/wiki/TracInterfaceCustomization#SiteAppearance

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Trac and TracDirectoryAuth 2.1.0

2018-03-04 Thread RjOllos


On Sunday, February 25, 2018 at 12:57:30 AM UTC, david.johnstone wrote:
>
> Good Morning,
>
>  
>
> I have been working on a new installation of Trac/Subverison, in 
> preparation for a migration to new hardware.
>
>  
>
> Part of the migration plan is to look at integrating the authentication 
> with Active Directory via LDAP.  Trac offers two options for authentication 
> via LDAP, either have Apache do the authentication or the have Trac do the 
> authentication using the TracDirectoryAuth plugin.  I have looked at both 
> options and think TracDirectoryAuth is neater/better solution.  
>
>  
>
> But I have hit a problem.  If the system idle for a period when Trac 
> connects to the LDAP server, the connection fails with either “Broken pipe” 
> or “Connection Reset” messages.
>
>  
>
> The problem seems to be that Windows cleans up idle LDAP connections, see 
> https://support.microsoft.com/en-au/help/261/ldap-and-kerberos-server-may-reset-tcp-sessions-immediately-after-crea.
>   
> In MS documentation it suggests -- “For the KDC ports, many clients, 
> including the Windows Kerberos client, will perform a retry and then get a 
> full timer tick to work on the session. LDAP applications have a higher 
> chance of considering the connection reset a fatal failure."
>
>  
>
> From my reading of the code, TracDirectoryAuth, tries to connect once, 
> fails and gives up.  A possible solution, would be to wait a second and 
> retry.
>
>  
>
> My knowledge of Python is not good enough to modify the code.  What I 
> think is needed, is to modify the routine “_ldap_search”, so that if the 
> connection fails, wait a second and retry.  
>
>  
>
> Is there someone that can look at modifying the code?
>
>  
>
> Cheers,
>
> David J.
>
>  
>
>  
>
>  
>
> =
>
>  
>
>  
>
>  
>
> 2018-02-25 10:52:29,076 Trac[auth] INFO: get users
>
> 2018-02-25 10:52:29,077 Trac[chrome] ERROR: Error with navigation 
> contributor PreferencesModule:
>
> Traceback (most recent call last):
>
>   File "/usr/lib64/python2.7/site-packages/trac/web/chrome.py", line 821, 
> in prepare_request
>
> contributor.get_navigation_items(req) or []:
>
>   File "/usr/lib64/python2.7/site-packages/trac/prefs/web_ui.py", line 48, 
> in get_navigation_items
>
> panels = self._get_panels(req)[0]
>
>   File "/usr/lib64/python2.7/site-packages/trac/prefs/web_ui.py", line 
> 137, in _get_panels
>
> p = list(provider.get_preference_panels(req) or [])
>
>   File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 130, in 
> get_preference_panels
>
> user_store = self.acctmgr.find_user_store(req.authname)
>
>   File "build/bdist.linux-x86_64/egg/acct_mgr/api.py", line 352, in 
> find_user_store
>
> user_list = store.get_users()
>
>   File "build/bdist.linux-x86_64/egg/tracext/dirauth/auth.py", line 153, 
> in get_users
>
> userinfo = self.expand_group_users(ldapCtx, self.group_validusers)
>
>   File "build/bdist.linux-x86_64/egg/tracext/dirauth/auth.py", line 182, 
> in expand_group_users
>
> attrlist=[to_utf8(self.member_attr)])
>
>   File "build/bdist.linux-x86_64/egg/tracext/dirauth/auth.py", line 746, 
> in _ldap_search
>
> msgid = context.search_ext(base, scope, filterstr, attrlist, 0, [lc], 
> None, -1, sz);
>
>   File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 820, 
> in search_ext
>
> timeout,sizelimit,
>
>   File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 308, 
> in _ldap_call
>
> reraise(exc_type, exc_value, exc_traceback)
>
>   File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 292, 
> in _ldap_call
>
> result = func(*args,**kwargs)
>
> SERVER_DOWN: {u'info': 'Broken pipe', 'errno': 32, 'desc': u"Can't contact 
> LDAP server"}
>

>From inspection, it appears that it should already be configured to retry 
the connection. The ldapCtx object that is used in the _ldap_search call is 
created in the _bind_dir method:
https://trac-hacks.org/browser/directoryauthplugin/trunk/tracext/dirauth/auth.py?rev=16087=294,295,310-312#L285

Here is the documentation for the ReconnectLDAPObject configuration options:
https://www.python-ldap.org/en/latest/reference/ldap.html?highlight=ReconnectLDAPObject#ldap.ReconnectLDAPObject

Also, have you tried modifying the [account-manager] dir_timeout option? It 
defaults to 5, and sets the value of OPT_TIMEOUT:
https://www.python-ldap.org/en/latest/reference/ldap.html?highlight=ReconnectLDAPObject#ldap.OPT_TIMEOUT

Does the timeout occur immediately when loading the page after the idle 
time? Or does it take 5 seconds until you see the traceback? It seems like 
the plugin is configured by default to retry 5 times at 1 second intervals. 
Or maybe 5 times at 5 second intervals? It's unclear to me if/how 
OPT_TIMEOUT and the retry_delay argument of ReconnectLDAPObject are related.

- Ryan

-- 
You received this message because you are subscribed to the 

[Trac] Re: Heading problem with docutils

2018-03-03 Thread RjOllos


On Tuesday, February 20, 2018 at 7:00:44 AM UTC-8, Nicolas MARTIN wrote:
>
> Hello Trac users, 
>
>
> I have downloaded and build docutils for your hosted project, the rst 
> wikiprocessor is working but I face an issue with section headings: my 
> lonely highest section title is recognized as the document title and so 
> the headings structure is not met under Trac as the title use h1 tag for 
> rendering. 
> The issue is probably better described here: 
>
> http://docutils.sourceforge.net/FAQ.html#unexpected-results-from-tools-rst2html-py-h1-h1-instead-of-h1-h2-why
>  
>
> They suggest to modify the default setting in the configuration with 
> docutils.conf file but where do I have to put this file to be taken into 
> account by Trac? I tested in the docutils build directory, PYTHONPATH, 
> plugins directory but nothing seems to be working. 
>
> Otherwise, does anybody know a workaround for this ? 
>
>
> Regards, 
> Nicolas 
>

Sourceforge is down so I can't see the "official" documentation, but it 
looks like you can specify the config file with the environment variable 
DOCUTILSCONFIG.
https://www.complang.tuwien.ac.at/doc/docutils-doc/docs/user/config.html#configuration-files

If you are using Apache and have loaded mod_env you can use the SetEnv 
directive:
https://httpd.apache.org/docs/2.4/mod/mod_env.html#setenv

Let me know if that works for you. I'm interested to know if we can rely on 
this environment variable, or if we need to make any modifications to Trac 
in order to have the config file respected.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Trac Tags -- too many values to unpack

2018-03-02 Thread RjOllos


On Friday, February 23, 2018 at 1:16:19 PM UTC, Jun Omae wrote:
>
> Hi,
>
> On Fri, Feb 23, 2018 at 8:13 PM, David Johnstone <
> david.johnst...@locata.com> wrote:
>
>> Good Evening,
>>
>>  
>>
>> When I attempt to access “Tag System à Replace” from the Admin menu, 
>> trac crashes with the error message “ValueError: too many values to unpack”
>>
>>  
>>
>> Is this a configuration error or a bug?
>>
>>  
>>
>> Tracebase --
>>
>>  
>>
>> 2018-02-23 22:06:57,882 Trac[main] ERROR: [192.168.10.153] Internal 
>> Server Error: , referrer '
>> http://172.16.12.41/admin'
>>
>> Traceback (most recent call last):
>>
>>   File "/usr/lib64/python2.7/site-packages/trac/web/main.py", line 623, 
>> in _dispatch_request
>>
>> dispatcher.dispatch(req)
>>
>>   File "/usr/lib64/python2.7/site-packages/trac/web/main.py", line 239, 
>> in dispatch
>>
>> resp = chosen_handler.process_request(req)
>>
>>   File "/usr/lib64/python2.7/site-packages/trac/admin/web_ui.py", line 
>> 109, in process_request
>>
>>provider.render_admin_panel(req, cat_id, panel_id, path_info)
>>
>> ValueError: too many values to unpack
>>
>
> ​It seems that tagsplugin/trunk is installed. The tagsplugin/trunk is to 
> develop with both Trac stable releases and trunk, so unstable. Instead, try 
> to use tagsplugin/tags/0.9 for Trac 1.2.x.
>
> ​If you want to use tagsplugin/trunk on Trac 1.2.x or 1.3dev (trunk), try 
> to apply the following patch:​
>
> diff --git a/tagsplugin/trunk/tractags/admin.py 
> b/tagsplugin/trunk/tractags/admin.py
> index 08ccd0eab..0ad94e9fc 100644
> --- a/tagsplugin/trunk/tractags/admin.py
> +++ b/tagsplugin/trunk/tractags/admin.py
> @@ -61,4 +61,4 @@ class TagChangeAdminPanel(Component):
>  all_tags = sorted(tag_system.get_all_tags(req, query))
>  data['tags'] = all_tags
>  Chrome(self.env).add_textarea_grips(req)
> -return 'admin_tag_change.html', data, None
> +return 'admin_tag_change.html', data
>
> -- 
> Jun Omae  (大前 潤)
>

In r16943, I had intended to keep it compatible with Trac 1.2, but clearly 
did not.
Should be fixed in [17046:17047].

Thanks,
- Ryan

https://trac-hacks.org/changeset/16943
https://trac-hacks.org/changeset?new=17047%40tagsplugin=17045%40tagsplugin
 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] How to set response headers for static files?

2018-03-02 Thread RjOllos


On Monday, February 26, 2018 at 8:27:25 AM UTC, Jun Omae wrote:
>
> Hi, 
>
> On Fri, Feb 23, 2018 at 9:00 PM, Velu Narasimman  
> wrote: 
> > I am working with a project developed using trac. I have learned 
> upto 
> > making a plugin. All static content in our project are served with out 
> > caching. So more request are hitting the server. How can I set "Expires" 
> > header so that the static files are cached in end user's browser? Please 
> > give me some code samples showing how and where exactly can I set the 
> > "Expires" header for CSS, JS files that are served from the plugin by 
> trac. 
> > 
> > I have came across the req.send_header() method but not sure how I 
> can 
> > set it for static files! so please help me on this. 
>
> It would be easy to use mod_expires on Apache rather than setting the 
> header from a plugin. 
>

Yeah, mod_expires seems like the way to go, and there must be something 
similar for Nginx and other webservers.

We do set the Expires header, but I'm unsure of the effect:
https://trac.edgewall.org/browser/tags/trac-1.2.2/trac/web/api.py?marks=685#L682

Perhaps #12964 will eventually be applicable for someone that really want 
to run TracStandalone rather than a third-party webserver and is still 
concerned about the caching policy.
https://trac.edgewall.org/ticket/12964

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] cant't login via a HTML form instead of using HTTP authentication. when i use accountManagerPlugin

2018-03-01 Thread RjOllos
You’ll need to remove the —basic-auth option from your tracd invocation.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Trac MailToTracPlugin and Trac 1.2

2018-02-22 Thread RjOllos


On Thursday, February 22, 2018 at 5:41:57 PM UTC-8, david.johnstone wrote:
>
> Good Afternoon,
>
>  
>
> I have been asked to look at installing the Trac plugin, MailToTrac (
> https://trac-hacks.org/wiki/MailToTracPlugin)
>
>  
>
> Does this plugin work with Trac 1.2, the shows it only working with Trac 
> 0.12.
>
>  
>
> Cheers
>
> David J.
>

I'm unsure if it will work with Trac 1.2. It doesn't currently have a 
maintainer.

You may be better off to try:
https://trac-hacks.org/wiki/EmailtoTracScript

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Image with wiki hyperlinks

2018-02-22 Thread RjOllos


On Thursday, February 22, 2018 at 5:23:34 AM UTC-8, Joerg Pleumann wrote:
>
> Hi Ryan,
>
> a bit difficult without posting the whole thing here. I'll try. We have a 
> process diagram drawn in PowerPoint that contains a hyperlink for each 
> process element. When we export this to SVG and load this into a browser we 
> have clickable links. These links get lost when rendering the SVG in a Wiki 
> page. We have the choice of linking the whole image to its "download me" 
> page or no links at all. Can this be worked around? The alternative is a 
> bitmap with an image map, which we could not make work either, though I'll 
> try your hint.
>
> Thanks & best regards
> Joerg
>

If you continue to have trouble, maybe try developing a simple example that 
replicates the issue, which you could submit here.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: TracDirectoryAuth 2.1.0 Plugin not populating User account information

2018-02-21 Thread RjOllos


On Wednesday, February 21, 2018 at 8:20:31 AM UTC-8, david.johnstone wrote:
>
> Good Evening,
>
>  
>
> I stopped apache and used traced for testing.  Same results, can see the 
> users being listed but no display name or email address is shown.
>
>  
>
> The issue seems be propagating the user details in to Trac, from the debug 
> log, the correct list of users are returned from ldap and _get_userinfo, 
> extracts the userinfo tuple from the LDAP search result.
>
>  
>
> The userinfo tuple is then not used, only the user name is shown.  
> Display_name and email are not shown.
>
>  
>
> Cheers
>
> David J.
>

As noted in my previous reply, you will need to disabled authentication in 
Apache and let AccountManager handle authentication.

There is previous discussion about this issue:
(1) 
https://groups.google.com/forum/#!searchin/trac-users/ldap$20apache$20email$20cooke|sort:date/trac-users/qjNDN4xNF20/1Ky2Q6a6BAAJ
(2) https://groups.google.com/forum/#!msg/trac-users/Koimg5owkYM/n2rKAzFeyfEJ
(3) https://trac.edgewall.org/ticket/7371

  

> You have Apache configured to handle authentication, so I suspect that 
> "DirAuthStore.check_password" will never get called. The only call to 
> "_populate_user_session" is in "check_password". "check_password" won't get 
> called with Apache configured to handle the authentication:
>
>
> https://trac-hacks.org/browser/directoryauthplugin/trunk/tracext/dirauth/auth.py?marks=263#L216
>
>  
>
> - Ryan
>
>  
>
> -- 
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to trac-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/trac-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: TracDirectoryAuth 2.1.0 Plugin not populating User account information

2018-02-21 Thread RjOllos


On Sunday, February 18, 2018 at 10:57:02 PM UTC-8, david.johnstone wrote:
>
> Good Afternoon,
>
>  
>
> I am trying to get the TracDirectoryAuth Plugin working.  I am using LDAP 
> to bind to  Windows Active Directory (AD). Trac seems to successful bind to 
> and retrieve the list of Users, Display names and email addresses. (See 
> trac.log below)
>
>  
>
> In the Accounts à Users, the list of users seems to be correct, but 
> display names and email address are missing.
>
>  
>
> I am not a Python programmer, but from what I can see in auth.py from the 
> plugin, the routine “_get_userinfo” is working.  The issue seems to be in 
> “_populate_user_session”.
>
>  
>
> Can some please help?
>
>  
>
> Cheers,
>
> David J.
>

You have Apache configured to handle authentication, so I suspect that 
"DirAuthStore.check_password" will never get called. The only call to 
"_populate_user_session" is in "check_password". "check_password" won't get 
called with Apache configured to handle the authentication:
https://trac-hacks.org/browser/directoryauthplugin/trunk/tracext/dirauth/auth.py?marks=263#L216

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Trac Perforce plugin

2018-02-19 Thread RjOllos


On Monday, February 19, 2018 at 10:46:15 PM UTC-8, Michela Ledwidge wrote:
>
> Unfortunately I can't even build this plugin on Debian as it relies on 
> pyprotocols which has been orphaned for years and not available in Debian 9 
> (Stretch)
>
 

> Any ideas on ways around this? I haven't used pyprotocols before
>
> I was able to install via pip a newer p4python package - but still 
> investigating the work required to port plugin to use this.
>

I would create a virtualenv and "pip install" all the dependencies.

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] AttributeError: 'Environment' object has no attribute 'get_db_cnx'

2018-02-19 Thread RjOllos
Let's start over. Where did you see the error "AttributeError: 
'Environment' object has no attribute 'get_db_cnx'"? If you saw it on page 
while navigating Trac, please send a screen capture.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] AttributeError: 'Environment' object has no attribute 'get_db_cnx'

2018-02-19 Thread RjOllos
Please share the full traceback associated with the exception. 

Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] AttributeError: 'Environment' object has no attribute 'get_db_cnx'

2018-02-19 Thread RjOllos


On Monday, February 19, 2018 at 10:18:06 AM UTC-8, David S wrote:
>
> Tried:
>
> $ pip uninstall TracAccountManager
> $ pip install svn+https://trac-hacks.org/svn/accountmanagerplugin/trunk
>
>
> But no succuss.
>

Repeat the "uninstall" command until it reports "not installed". It's 
common to have eggs installed for multiple versions if you haven't been 
using pip previously, since setuptools does not provide an uninstall tool.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Puzzling trac permissions error

2018-02-13 Thread RjOllos


On Tuesday, February 13, 2018 at 3:04:08 PM UTC-5, Niles Oien wrote:
>
>
>
> It took me a couple of days to get back to this. I looked at it fpor a 
> while today. I'm completely baffled.
>
> In the end I went with a *very* stripped down setup that doesn't even have 
> trac in it, and I still get errors, so I *guess* it's an apache config 
> error?
>
> What I have in httpd.conf is :
>
>
> WSGIScriptAlias /apacheTest /usr/local/apacheTest/wsgiTest.wsgi
> 
>  Order allow,deny
>  Allow from all
>  Require all granted
> 
>

The mixes pre-Apache-2.4 and Apache-2.4 syntax. Please try:

WSGIScriptAlias /apacheTest /usr/local/apacheTest/wsgiTest.wsgi

 Require all granted
 

Our example in the documentation is:

WSGIApplicationGroup %{GLOBAL}
# For Apache 2.2

Order deny,allow
Allow from all

# For Apache 2.4

Require all granted



That's meant to work on Apache 2.2 and 2.4, by using a test for existence 
of mod_authz_core.c. It's possible that doesn't work correctly in all 
cases. If you are using Apache 2.4, you can simplify the example to:


WSGIApplicationGroup %{GLOBAL}
Require all granted


- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Image with wiki hyperlinks

2018-02-13 Thread RjOllos
On Wednesday, January 24, 2018 at 1:32:59 PM UTC, Joerg Pleumann wrote:
>
> Hi,
>
> sorry is this has been discussed before, but we cannot seem to make it 
> work: We are using Trac 1.2.2 and want to display an image with clickable 
> hyperlink regions that point to other Trac wiki pages. SVG is preferred 
> because of scalability, but unfortunately the links got lost when rendering 
> the SVG. We can choose between a link to the graphic itself (default 
> behavior) or one that is not clickable at all (map/usemap, from here 
> ). A bitmap with HTML clickable 
> regions would also be ok. I guess we could always try to express the whole 
> thing as inline HTML code and use static resources from "somewhere", but 
> that does not seem so maintainable/elegant.
>
> Any hints are appreciated.
>
> Cheers
> Joerg
>

I haven't used image maps very often, but it seems like #4969 is 
misleading. The Image macro use the value of the usermap argument when 
generating the img element. I'm not sure that an attachment like 
"photomap.txt" is supported as a value for the usermap argument. It looks 
like usermap must refer to a usermap element in the HTML. Therefore, I 
assume the only way is to put the usermap element inline in the HTML using 
a WikiProcessor.

For example, PlantUmlMacro supports image maps (1). The markup looks like 
this:


http://www.google.com; 
title="http://www.google.com; alt="" coords="8,3,48,117">



It may be that I'm not entirely following your usecase. Could you provide a 
concrete example?

- Ryan

(1) https://trac-hacks.org/ticket/10998

 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: BlueFlatTheme menu not working on Safari for iOS

2018-02-12 Thread RjOllos


On Monday, February 12, 2018 at 3:15:45 PM UTC-5, Matthew wrote:
>
> Anyone have any ideas on how to get the main menu for 
> https://trac-hacks.org/wiki/BlueFlatTheme to work on Safari, specifically 
> on iOS? It doesn't work in Safari on my iPhone, Safari in Responsive 
> Developer mode, or in the iOS simulator.
>
> It works fine on Chrome on Android and desktop.
>

This issue looks similar to what you are reporting, and has a proposed fix:
https://trac-hacks.org/ticket/13176

If that happens to be the right fix and you can confirm it, I can commit 
the change.

- Ryan
 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Puzzling trac permissions error

2018-02-12 Thread RjOllos


On Friday, February 9, 2018 at 11:49:12 PM UTC-5, Niles Oien wrote:
>
>
>
> I just changed ownership on /var/www to apache:apache - it was root:root. 
> It made no difference.
>
> I set up a URL that shows it not being able to write to the database :
> http://netdrms02.nispdc.nso.edu/Niles
>
> And another one with logging enabled that shows it not being able to write 
> the trac log :
> http://netdrms02.nispdc.nso.edu/NilesLog
>
> Which, given that I can do both those things when I su -m to apache, is 
> just weird. And without a log, I can't really proceed - I have no idea 
> what's going on. Any help appreciated.
>
> Thanks,
>
> Niles.
>

Following the suggested debug steps with strace or as Dan suggested is the 
best way to go.

You could also run and report to us the following: 
$ find /path/to/trac/env  -exec ls -l {} \;

I would stop Apache and try running with tracd (Trac Standalone) under user 
Apache, to see if you get any of the same errors.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Puzzling trac permissions error

2018-02-09 Thread RjOllos


On Friday, February 9, 2018 at 3:01:23 PM UTC-5, Niles Oien wrote:
>
>
> Hi all,
>
> I have a puzzling error.
>
> I am running on CentOS Linux release 7.4.1708. I installed 
> trac-1.0.13-1.el7.noarch through yum. I'm trying to get an initial trac 
> setup going. In my httpd.conf I have :
>
> WSGIScriptAlias /trac /var/www/trac/trac.wsgi
>
> 
> WSGIApplicationGroup %{GLOBAL}
> # For Apache 2.2
> # 
> #Order deny,allow
> #Allow from all
> # 
> # For Apache 2.4
> 
> Require all granted
> 
> 
>
> I did an initenv and deploy with trac-admin.
>
> If I pull up the trac web page, it comes up in a browser, but I get this 
> message :
>
> Error with navigation contributor "BrowserModule"
> Can't synchronize with repository "(default)" (The user apache 
> requires read _and_ write permissions to the database file 
> /var/www/trac/db/trac.db and the directory it is located in.). Look in the 
> Trac log for more information.
> The user apache requires read _and_ write permissions to the database 
> file /var/www/trac/db/trac.db and the directory it is located in.
>
> And if I turn logging on so I can look at the log, I get this in the 
> browser :
> TracError: IOError: [Errno 13] Permission denied: 
> u'/var/www/trac/log/trac.log'
>
> So, basically, both errors would sem to be traceable to nothing under 
> /var/www/trac/ being 'apache' read-writeable.
>
> But I've done this :
> chown -R apache:apache /var/www/trac
>
> I can su -m apache and create and delete files under /var/www/trac as 
> apache. I can run sqlite3 like so : sqlite3 db/trac.db --- and then I can 
> do updates on tables in the database, and reverse them. I've tried this 
> simple WSGI script to test the apache/mod_wsgi/python setup :
>
> def application(environ, start_response):
> start_response('200 OK',[('Content-type','text/html')])
> return ['Hello World!']
>
> And it seems to work (I get "Hello world" in the browser).
>
> I don't see anything in the apache error logs, and nothing unremarkable in 
> the access logs. The apache setup is utterly vanilla, nothing at all non 
> standard, it certainly seems to be running as user apache.
>
> Please help, it's quite baffling - all the error messages I'm getting 
> suggest that it's a permissions issue for user apache under /var/www/trac/ 
> and I am absolutely not seeing that.
>
> Thanks,
>
> Niles Oien National SOlar Observatory Boulder CO
>


That does seem strange. Can you confirm that user apache has r/w 
permissions for /var/www as well? 

You could try running tracd with strace as the apache user. I haven't used 
strace much so unsure if that will show much that's useful.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Trac Perforce plugin

2018-02-04 Thread RjOllos


On Friday, February 2, 2018 at 2:04:21 AM UTC-8, Michela Ledwidge wrote:
>
> Is perforce freely available in case i want to test, or is a license 
>> needed?
>>
>> Yes it's available.
>
> "A full version of Helix Core is free for up to 5 users and 20 workspaces"
>
> https://www.perforce.com/downloads/helix-core-p4d 
>
> There's a lot to wade through but p4d is the server and p4v is the client.
>
>
> Michela
>

Thanks. Let us know what you find in the log files.

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Problem with syntax coloring in Trac Wiki

2018-02-04 Thread RjOllos


On Saturday, February 3, 2018 at 12:48:38 PM UTC-8, lor712en73zo wrote:
>
> Hi everybody,
>
> this is my first post to the mailing list.
>
> I can not get syntax coloring working inside TracWiki.
>
> I've installed Trac on a Kubuntu machines inside a python virtualenv.
> I've installed the following packages using pip:
>
> docutils (0.14) 
> Genshi (0.7) 
> pip (9.0.1) 
> Pygments (2.2.0) 
> Trac (1.2.2) 
>
> I'm testing syntax coloring in a wiki page with the following code block 
> but it's not working:
>
> {{{#!python
> def hello():
> return 'world'
> }}}
>

Next step is troubleshooting is to check the logs,
https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheLogs

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: TracHacks itself - problem with upper case username

2018-02-03 Thread RjOllos


On Friday, December 29, 2017 at 12:57:56 AM UTC-8, torgeriedel wrote:
>
> Hi, 
>
> lot of years ago I registered at TracHacks with my username "DG1000S". 
> However I cannot login and trying to register with it as new user says "No 
> uppercase user names allowed",


Confirmed. I think that is correct behavior because all-uppercase tokens 
are reserved for permission actions. Technically we only avoid using 
all-uppercase for groups, so this is more of a convention in order to avoid 
confusion.
 

> but trying with "DG1000s" then says "A user name only differing in case 
> exists already". 
>

The message I see is:
Another account or group already exists, who's name differs from *DG1000s* 
only by case or is identical. 

So I think that is also correct.  
 

> Is there a chance to tweak trac hacs database to change the username to 
> "DG1000s"? If the password hash is not changed, I should be able to login. 
>
> Regards 
> Torge 
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Trac Emails

2018-02-01 Thread RjOllos
On Thursday, February 1, 2018 at 2:03:52 PM UTC-8, Robert X wrote:
>
> Am I reading the documentation correctly that emails are only for 
> notification purposes? I did a simple mailx test and received an email, so 
> I know I can use the sendmail option to send email notifications.
>

You can use sendmail or SMTP to send notifications. I've used Gmail as a 
sendmail server, and SendGrid works well. SendGrid has a free plan that 
gives like 10k emails per month.
 

> Does Trac do more than that and should I setup a trac@ email for my domain 
> or a dummy gmail account? What are the benefits etc. of that.
>

If you are talking about parsing emails to tickets, there is a 
well-maintained package for that:
https://trac-hacks.org/wiki/EmailtoTracScript
 

> I am reading: https://trac.edgewall.org/wiki/TracNotification
>
> Appreciate it.
>
> -- 
> Bob
>
>
- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Update copyright notice

2018-01-28 Thread RjOllos


On Sunday, January 28, 2018 at 12:43:28 AM UTC-8, figaro wrote:
>
> The footer of trac.edgewall.org still states Copyright © 2003-2017 
> Edgewall Software. All rights reserved.
> even though we are in 2018 already.
>

Updated, and it's part of the release checklist now. Any other instance of 
2017 should be updated when we do the next release.

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Dire help of trac.ini syntax...specifically, set_owner

2018-01-27 Thread RjOllos
On Saturday, January 27, 2018 at 4:14:10 PM UTC-8, Mike Richards wrote:
>
> Hello.  For a few months now, I've tinkered with the trac.ini file but 
> never took any huge leaps of faith and risk screwing everything up.  Part 
> of that tinkering is with the set_owner option.  For the life of me I 
> cannot find the syntax to set the available owners a ticket can be 
> assigned.  I see set_owner_to_self, set_owner, etc.  And I've read where 
> you can include comma separate values but nothing I try seems to work.  
> presumably, the syntax is action.set_owner=username.  i.e. 
> escalate1.set_owner=Tier2 where Tier2 is a user in Trac.  
>
> Any insight would be GREATLY appreciated...I'm going NUTS trying to figure 
> out how to limit who and when a ticket can be reassigned.  I want to 
> control who people can reassign a ticket to rather than skipping a layer in 
> our escalation path.
>
> Thanks,
> Mike
>

You need two changes:
action.operations = set_owner
action.set_owner = user1, user2, ...

Examples here:
https://trac.edgewall.org/wiki/TracWorkflow

I've made some comments about how the field name "set_owner" can be 
confusing:
https://trac.edgewall.org/ticket/11856

- Ryan
 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [SPAM FAIBLE]Re: [SPAM FAIBLE]Re: [Trac] Issue with fields displayed in the header of the ticket box

2018-01-26 Thread RjOllos


On Tuesday, January 23, 2018 at 12:59:48 PM UTC-8, Nicolas MARTIN wrote:
>
> https://trac-hacks.org/ticket/13362
>

Thanks for tracking that down and filing a ticket. I will try to get it 
fixed soon.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: TypeError: coercing to Unicode: need string or buffer, NoneType found

2018-01-26 Thread RjOllos


On Thursday, January 25, 2018 at 12:30:15 AM UTC-8, vermaakki8400 wrote:
>
> File 
> "/usr/lib/python2.6/site-packages/Trac-1.0.9-py2.6.egg/trac/web/main.py", 
> line 554, in _dispatch_request
>   dispatcher.dispatch(req)
> File 
> "/usr/lib/python2.6/site-packages/Trac-1.0.9-py2.6.egg/trac/web/main.py", 
> line 267, in dispatch
>   iterable=chrome.use_chunked_encoding)
> File 
> "/usr/lib/python2.6/site-packages/Trac-1.0.9-py2.6.egg/trac/web/chrome.py", 
> line 1075, in render_template
>   stream |= self._filter_stream(req, method, filename, stream, data)
> File 
> "/usr/lib/python2.6/site-packages/Genshi-0.7-py2.6-linux-x86_64.egg/genshi/core.py",
>  line 133, in __or__
>   return Stream(_ensure(function(self)), serializer=self.serializer)
> File 
> "/usr/lib/python2.6/site-packages/Trac-1.0.9-py2.6.egg/trac/web/chrome.py", 
> line 1319, in inner
>   data)
> File "build/bdist.linux-x86_64/egg/testmanager/wiki.py", line 159, in 
> filter_stream
>   return self._testcase_wiki_view(req, formatter, planid, page_name, stream)
> File "build/bdist.linux-x86_64/egg/testmanager/wiki.py", line 489, in 
> _testcase_wiki_view
>   tag.input(type='button', value=_("Open a Ticket on this Test Case"), 
> onclick='creaTicket("'+tc_name+'", "", "", "'+summary+'")'),
>
>
Associated issue: https://trac-hacks.org/ticket/13365 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Bitnami Stack: base_url error

2018-01-26 Thread RjOllos


On Friday, January 26, 2018 at 12:36:21 PM UTC-8, Robert X wrote:
>
> I have everything running and now I am just monitoring different actions 
> (all new to me).
>
> I am getting: Trac[env] WARNING: base_url option not set in configuration, 
> generated links may be incorrect
>
> What is the "base_url"? Do I need to set it and to what? 
>
> I've googled the error but nothing about fixing it.
>
> Using Trac 1.2 for this.
>
> Appreciate the help.
>
> -- 
> Bob
>

Here is the documentation:
https://trac.edgewall.org/wiki/TracIni#project-url-option

Let me know if it is unclear.

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Can Trac ticket be closed by reporter only?

2018-01-23 Thread RjOllos


On Tuesday, January 23, 2018 at 2:05:01 PM UTC-8, RjOllos wrote:
>
>
>
> On Tuesday, January 23, 2018 at 1:58:36 PM UTC-8, mamamia888 wrote:
>>
>>  Can Trac ticket be closed by "reporter" only? Based on what I checked,
>>  it's only allowed to use the permissions(TICKET_MODIFY, etc.) to control.
>>  If it's possible, could you share the information to modify the ticket
>>  work flow in order to enforce it?
>>
>
> Similar requests arise fairly often so we've added a CookBook entry:
>
> https://trac.edgewall.org/wiki/CookBook/PermissionPolicies#RestrictaWorkflowActiontotheTicketOwner
>
> In the python code provided on that page, you just need to replace:
> ticket['owner'] -> ticket['reporter']
>
> Let me know if anything is unclear. I will modify the page later today to 
> describe how to enforce the permission policy for reporter rather than 
> owner.
>
> - Ryan
>

Page updated:
https://trac.edgewall.org/wiki/CookBook/PermissionPolicies?action=diff=16

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Can Trac ticket be closed by reporter only?

2018-01-23 Thread RjOllos


On Tuesday, January 23, 2018 at 1:58:36 PM UTC-8, mamamia888 wrote:
>
>  Can Trac ticket be closed by "reporter" only? Based on what I checked,
>  it's only allowed to use the permissions(TICKET_MODIFY, etc.) to control.
>  If it's possible, could you share the information to modify the ticket
>  work flow in order to enforce it?
>

Similar requests arise fairly often so we've added a CookBook entry:
https://trac.edgewall.org/wiki/CookBook/PermissionPolicies#RestrictaWorkflowActiontotheTicketOwner

In the python code provided on that page, you just need to replace:
ticket['owner'] -> ticket['reporter']

Let me know if anything is unclear. I will modify the page later today to 
describe how to enforce the permission policy for reporter rather than 
owner.

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Merging two Trac instances?

2018-01-16 Thread RjOllos
On Tuesday, January 16, 2018 at 8:28:57 AM UTC-8, W. Martin Borgert wrote:
>
> Hi, 
>
> I like to Trac instances. Both instances have tickets, wiki, and git 
> repos. 
> I'm using Trac 1.2 with PostgreSQL on Debian stable. 
> I came across 
> https://reinout.vanrees.org/weblog/2009/05/28/merging-trac.html, 
> but it does not talk about tickets, users, milestones, etc. 
> Does anybody know of a more complete recipe? 
>
> TIA! 
>

* Git repository is very simple: Just add the Git repository to the 
configuration and resync if you have a cached repository type.
* Wiki is simple if there are no page name collisions. You can just 
export/import using TracAdmin. However, you can also do this by dump/load 
of the wiki table, and since you have to handle a number of other tables, 
that is the way to go.
* Milestones are stored in the database, so you can do a database dump/load 
of the table, and it will go smooth assuming there are no naming collisions
* You can dump and reload tickets from the database, but the ticket 
numbering will change, assuming the ticket numbering of both system started 
at 1. You could dump the ticket table, change the numbering by an offset 
and load into the new system. You'll need to modify the attachments, 
ticket_custom and the ticket_change tables as well, to account for the new 
ticket ids.
* There are some other tables you should be concerned with, like Versions, 
Priorities ... and other associated with the ticket system. Also, the 
permissions table. Here is the list of tables:
https://trac.edgewall.org/wiki/TracDev/DatabaseSchema
 * You can ignore: auth_cookie, cache, node_change, revision. As mentioned, 
I'd also ignore the repository table and just add the new repository 
manually.
* Users - depends on the authentication mechanism. It might just be a 
matter of merging htpasswd or htdigest files.

I'd start with a backup of both systems and start working on a script. Feel 
free to post here for advice on the script as it progresses. If you refine 
the script it could be posted as a script on trac-hacks.org, so happy to 
help you get it refined.

The trac-admin hotcopy utility can be used to dump the database on the 
system you are migrating away from.

Which Trac version and which database type? Do you have plugins installed?

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: No handler matched request to /{ at 0x0458E0F0>

2018-01-16 Thread RjOllos


On Tuesday, January 16, 2018 at 8:54:58 AM UTC-8, Shad wrote:
>
> Hi,
>
> I tried editing the ticket.html file of my TRAC installation with the 
> following:
>
> 
>
> ...
> ...
> ...
> 
>   https://localhost:8000/project1/wiki/example};>example
> 
>
> I did this manipulation because I wanted to add a link on the ticket page. 
> Thus I created a page in wiki (by name example) and tried adding a 
> reference in the ticket page.
>
> But it gave me the following error:
> No handler matched request to /{ at 0x0458E0F0>
>
> What is that am missing out? Any help is much appreciated.
>
> Thanking you in advance,
>
> Regards, 
> shad
>

You shouldn't have curly brackets around the URL. Also, you can use a 
relative path.


  example
 

You should add customizations through a plugin or site.html. By editing a 
template, you'll have to rebase your changes on ticket.html every time you 
update Trac. Discussed more in:

https://trac.edgewall.org/wiki/TracInterfaceCustomization#SiteAppearance
https://trac.edgewall.org/wiki/TracInterfaceCustomization#ProjectTemplates

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: Code Comment messages

2018-01-16 Thread RjOllos


On Monday, January 15, 2018 at 12:10:31 AM UTC-8, Roger Oberholtzer wrote:
>
> On Fri, Jan 12, 2018 at 8:27 PM, RjOllos <rjol...@gmail.com> wrote: 
> > 
> > 
> > On Friday, January 12, 2018 at 2:20:36 AM UTC-8, Roger Oberholtzer 
> wrote: 
> >> 
> >> Have I perhaps missed something in the CodeComment plugin: When a 
> >> comment is added, there is no notification (e.g., e-mail) or entry in 
> >> the timeline. Should there be? 
> >> 
> >> -- 
> >> Roger Oberholtzer 
> > 
> > 
> > This plugin?: 
> > https://github.com/trac-hacks/trac-code-comments-plugin 
>
> That's the one. 
>
> > It should send notifications. If not, I would start by checking the 
> logs. 
> > There is a [code_comments] notify_self option that can be either true or 
> > false. 
>
> I have this in my ini file: 
>
> code_comments.api.codecommentsystem = enabled 
> code_comments.comment_macro.codecommentlinkmacro = enabled 
> code_comments.db.codecommentssetup = enabled 
> code_comments.notification.codecommentchangelistener = enabled 
> code_comments.subscription.subscriptionadmin = disabled 
> code_comments.subscription.subscriptionlisteners = disabled 
> code_comments.subscription.subscriptionmodule = disabled 
> code_comments.ticket_event_listener.updateticketcodecomments = enabled 
> code_comments.web.bundlecommentsredirect = enabled 
> code_comments.web.codecomments = enabled 
> code_comments.web.commentsrest = enabled 
> code_comments.web.deletecommentform = enabled 
> code_comments.web.jsdataforrequests = enabled 
> code_comments.web.listcomments = enabled 
> code_comments.web.mainnavigation = enabled 
> code_comments.web.wikipreview = enabled 
>
> Is there more that can be configured? 
>
> I don't know what to be looking for in the log. 
>

I would look for the error "Failure sending notification":
https://github.com/trac-hacks/trac-code-comments-plugin/blob/master/code_comments/notification.py#L109

The plugin hasn't been modified for the Trac 1.2 notification API changes, 
but should still work because of the legacy support in Trac 1.2. The plugin 
also doesn't have support for AnnouncerPlugin.

- Ryan

 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Code Comment messages

2018-01-12 Thread RjOllos


On Friday, January 12, 2018 at 2:20:36 AM UTC-8, Roger Oberholtzer wrote:
>
> Have I perhaps missed something in the CodeComment plugin: When a 
> comment is added, there is no notification (e.g., e-mail) or entry in 
> the timeline. Should there be? 
>
> -- 
> Roger Oberholtzer 
>

This plugin?:
https://github.com/trac-hacks/trac-code-comments-plugin

It should send notifications. If not, I would start by checking the logs. 
There is a [code_comments] notify_self option that can be either true or 
false.

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Users page very slow to load - every time

2018-01-07 Thread RjOllos


On Friday, January 5, 2018 at 11:39:47 AM UTC-5, shi...@securitycompass.com 
wrote:
>
> We are using the DirectoryAuthPlugin and it's successfully authenticating 
> off our ldap server.
> However retrieving list of users from Admin -> Users takes up to 30 sec, 
> and there are only 150 users.   
>
> Debug messages suggest increasing cache_memsize.  I've tried increasing 
> this value and other cache values in [account manager] section but it has 
> no noticeable effect, though I can see from the logs that the new values 
> are being applied.
>
> [account manager]
> cache_memsize = 1000
> cache_memsize_warn = 800
> cache_ttl = 3600
> cache_memprune = 5
>
> Log excerpt:
> These messages appear repeatedly while the Users page prepares to load:
> 2018-01-05 10:59:16,668 Trac[auth] INFO: pruning memcache in less than 800 
> seconds, you might increase cache_memsize.
> 2018-01-05 10:59:16,668 Trac[auth] DEBUG: pruning memcache by 5: (current: 
> 2 > max: 1000 )
> 2018-01-05 10:59:16,669 Trac[auth] DEBUG: memcache hit for allusers
> 2018-01-05 10:59:16,727 Trac[auth] DEBUG: userlist:
>
> Trac version is 1.0.1
>
> I've tested running ldapsearch command from trac server to ldap server the 
> response time is fast.
>
> Trac GUI takes about 30 sec to view the Users page, or a single user, each 
> and every time. Is something wrong with my configuration?  Is there a way 
> to improve this response time?  Are there any further debugging clues that 
> I can look for?
>
> Kind regards,
> Shiela Spaleta
>

Are you running the latest AccountManager 0.5dev?

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Needing help with Trac Wiki and Slack integration

2018-01-04 Thread RjOllos


On Wednesday, January 3, 2018 at 9:22:34 AM UTC-5, sajjad maghareh wrote:
>
> Hi guys, 
>
> I have installed trac-slack-plugin:
>
> 1. From github source generated the egg file
> 2. Moved egg file to /trac-env/plugins folder 
> 3. Installed requests
>
> 4. Enabled the plugin in trac.ini:
> [components]
> slack_notification.* = enabled
>
> 5. Set the following tags in trac.ini
>
> [slack]
> wiki-webhook = 
> wiki-channel = #TracWiki
> wiki-username = Trac-Bot
> wikiadd = 1   ; 0 = off, 1 = on; defaults to 1
> wikidel = 1   ; 0 = off, 1 = on; defaults to 1
> wikichange = 1; 0 = off, 1 = on; defaults to 0
> wikipages = .*; when wikichange is on, regex to use to see if we 
> should notify on the change; defaults to everything (.*)
>
> 6. ran sudo trac-admin .../trac-env/ upgrade
>
> 7- restarted apache2 
>
> However, still the integration doesn't work when I change a page in Trac 
> Wiki. I looked at the log file in /trac-env/log but it doesn't show any 
> errors (have attached the log file). 
>
> Can anyone help me find out what the issue can be?
>
> Thanks a lot in advance. 
> Rasool
>

I assume you have installed from here:
https://github.com/wagnerpinheiro/trac-slack-plugin

However, there are also several forks of this plugin, which is why I raise 
the point.

The trac-slack-plugin is loading, but there is no debug-level logging so we 
can't know if it's succeeding with sending the request to Slack. The lack 
of an exception in the log suggests that Trac is probably sending the 
message.

Did you configure the incoming web hook?
https://api.slack.com/incoming-webhooks

Is there a log for the incoming web hook in Slack that you can look at to 
see if the message was received from Trac?

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: TracHacks itself - problem with upper case username

2017-12-31 Thread RjOllos


On Friday, December 29, 2017 at 12:57:56 AM UTC-8, torgeriedel wrote:
>
> Hi, 
>
> lot of years ago I registered at TracHacks with my username "DG1000S". 
> However I cannot login and trying to register with it as new user says "No 
> uppercase user names allowed", but trying with "DG1000s" then says "A user 
> name only differing in case exists already". 
>

I'll have to look at those error messages more closely. Per your 
description, it seems the error messages don't match what is expected.
 

> Is there a chance to tweak trac hacs database to change the username to 
> "DG1000s"? If the password hash is not changed, I should be able to login. 
>
> Regards 
> Torge 
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: TracHacks itself - problem with upper case username

2017-12-31 Thread RjOllos


On Friday, December 29, 2017 at 12:57:56 AM UTC-8, torgeriedel wrote:
>
> Hi, 
>
> lot of years ago I registered at TracHacks with my username "DG1000S". 
> However I cannot login and trying to register with it as new user says "No 
> uppercase user names allowed", but trying with "DG1000s" then says "A user 
> name only differing in case exists already". 
>
> Is there a chance to tweak trac hacs database to change the username to 
> "DG1000s"? If the password hash is not changed, I should be able to login. 
>
> Regards 
> Torge 
>

I see a user in the database named "DG1000s". Let me know if you aren't 
able to login with that username and I'll reset your password.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Ticket Version Macro?

2017-12-14 Thread RjOllos


On Thursday, December 14, 2017 at 4:17:20 PM UTC-8, RjOllos wrote:

>
> """Ticket version macro for Trac 1.0.16"""
>

This line is harmless, but should be deleted or changed to """Ticket 
version macro for Trac 1.0.11+"""

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Ticket Version Macro?

2017-12-14 Thread RjOllos


On Thursday, December 14, 2017 at 7:13:25 AM UTC-8, Florian Schricker wrote:
>
> Hi!
>
>
> I am looking for a way to show the current ticket version number in the 
> ticket description using a macro. Something like [[TicketVersion]] printing 
> "18" for a ticket w/ the current version being 18 would suit my needs just 
> fine.
>
> Has anybody ever written such a thing and is willing to share?
>
>
> Thank you and kind regards,
> Florian Schricker
>


Hi Florian,

Macros like the one you have requested are pretty easy to write if you are 
familiar with Python. Take a look at (1).

Please try the following (also attached in TicketVersionMacro.py)

[BOF]

# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consists of voluntary contributions made by many
# individuals. For the exact contribution history, see the revision
# history and logs, available at http://trac.edgewall.org/log/.

from trac.ticket import Ticket
from trac.util import as_int
from trac.util.html import tag
from trac.wiki.formatter import MacroError
from trac.wiki.macros import WikiMacroBase

"""Ticket version macro for Trac 1.0.16"""

revision = '1.0'
author = 'Edgewall Trac'
url = 'https://trac.edgewall.org/wiki/WikiMacros'


class TicketVersionMacro(WikiMacroBase):
"""Display ticket version inline.

Can be used from the ticket page to show the version of the ticket:
{{{
[[TicketVersion]]
}}}

Can be used anywhere that accepts wiki content when specifying a
ticket id:
{{{
[[TicketVersion(1)]]
}}}
"""

def expand_macro(self, formatter, name, content, args=None):
content = content or ''
if not content:  # [[TicketVersion]] from ticket page
realm = formatter.resource.realm
rid = formatter.resource.id
if realm == 'ticket' and rid:
tid = rid
else:
raise MacroError("Invalid realm (%s) and/or resource id 
(%s) "
 "for macro call with no arguments."
 % (realm, rid))
else:  # [[TicketVersion(N)]] from any wiki content
content = content.strip()
tid = as_int(content, default=None)
if tid is None:
raise MacroError("'%s' is not a valid ticket id." % content)
ticket = Ticket(self.env, tid)
return tag.span(ticket['version'], class_='trac-ticket-version')


[EOF]

It should work with 1.0.11+, but would need to be adapted for a least some 
early 1.0.x versions because MacroError (2) was used.

Deploy the single file plugin as described in (3). Let me know if you have 
any questions.

- Ryan

(1) https://trac.edgewall.org/wiki/WikiMacros#DevelopingCustomMacros
(2) https://trac.edgewall.org/ticket/12359
(3) https://trac.edgewall.org/wiki/TracPlugins#InstallingaTracplugin

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consists of voluntary contributions made by many
# individuals. For the exact contribution history, see the revision
# history and logs, available at http://trac.edgewall.org/log/.

from trac.ticket import Ticket
from trac.util import as_int
from trac.util.html import tag
from trac.wiki.formatter import MacroError
from trac.wiki.macros import WikiMacroBase

"""Ticket version macro for Trac 1.0.16"""

revision = '1.0'
author = 'Edgewall Trac'
url = 'https://trac.edgewall.org/wiki/WikiMacros'


class TicketVersionMacro(WikiMacroBase):
"""Display ticket version inline.

Can be used from the ticket page to show the version of the ticket:
{{{
[[TicketVersion]]
}}}

Can be used anywhere that accepts wiki content when specifying a
ticket id:
{{{
[[TicketVersion(1)]]
}}}
"""

def expand_macro(self, formatter, name, content, args=None):
content = content or ''
if not content:  # [[TicketVersion]] from ticket page
realm = formatter.resource.realm
rid = formatter.resource.id
if realm == 'ticket' and rid:
tid = rid
else:
  

Re: [Trac] Re: About due date functionality existing approaches

2017-12-12 Thread RjOllos


On Tuesday, December 12, 2017 at 1:59:01 PM UTC-8, emecas wrote:
>
> Thanks Ryan
>
> Actually, I was wonder if there was a better way to handle it  using  
> Trac's core.
>
> The problem with the custom field approach, in general, is regarding to 
> the additional join it requires that in some cases. Maybe it is not too 
> relevant, just from the performance point of view or about queries 
> complexity. 
>
> Some of my queries sums up 3-6 joins, those with multiple custom fields 
> mixed with information from tables related to macros and plugins.
>
> EmeCas
>

You could write a plugin to add a columns to the ticket table, but it's 
generally not advised because you might encounter problems with upgrades in 
the future. I think that learning to love the JOINs is your best option.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: About due date functionality existing approaches

2017-12-12 Thread RjOllos


On Monday, December 11, 2017 at 3:20:33 PM UTC-8, emecas wrote:
>
> Hi
>
> Different than using milestones or a custom field, Is there another way to 
> achieve a due date functionality for the tickets?
>
> I have review an interesting plugin (working OK with Trac 1.2) that 
> address partially this requirement, QueuesPlugin [1].
>
> Wonder if someone knows about any alternative way to handle a due date 
> concept in Trac.
>

What are you requirements? In what way does a custom field not fulfill 
those requirements? 

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Microsoft Azure SSO integration with Trac

2017-11-28 Thread RjOllos


On Sunday, November 26, 2017 at 8:37:48 AM UTC-8, Benyamin Hirschberg wrote:
>
> Hi!
>
> I'm trying to set up my new Trac server with Apache 2.4 and with Microsoft 
> Azure AD SSO integration.
>
> I found that the component I'm missing was mod_auth_openids which should 
> the the authentication in Apache for Trac access.
>

Do you mean mod_auth_openidc?
https://github.com/zmartzone/mod_auth_openidc
 

> I'm far from being an expert on these protocols neither on the application 
> side. 
>
> How should the user information should be propagated from the OpenID 
> Connect  module to Trac? Has anyone of you done this integration?
>

I haven't worked with anything other than basic and digest auth. Looking at 
the snippets in the docs for mod_auth_openidc, it looks like you can 
probably setup a Location directive that is similar to the examples in the 
Trac docs, but with a different AuthType:

https://trac.edgewall.org/wiki/TracModWSGI#UsingBasicAuthentication

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Need help on trac migration 1.0.13 to 1.2.2: TracError: Unsupported database type "mysql"

2017-11-16 Thread RjOllos


On Wednesday, November 15, 2017 at 11:25:52 AM UTC-8, torgeriedel wrote:
>
> Am 15.11.2017 um 07:18 schrieb Torge Riedel:
>
> Am 14.11.2017 um 09:48 schrieb RjOllos:
>
>
>
> On Monday, November 13, 2017 at 10:41:30 PM UTC-8, torgeriedel wrote: 
>>
>> Am 13.11.2017 um 14:09 schrieb Jun Omae: 
>> > On Sun, Nov 12, 2017 at 11:41 PM, Torge Riedel <torgerie...@gmx.de> 
>> wrote: 
>> >> Ok, this switched to a general issue. I followed documentation on 
>> >> https://trac.edgewall.org/wiki/TracInstall and then the following 
>> call to 
>> >> initialize a new environment: 
>> >> 
>> >> trac-admin /var/www/trac/env2 initenv 
>> >> 
>> >> Creating a new Trac environment at /var/www/trac/env2 
>> >> 
>> >> Trac will first ask a few questions about your environment 
>> >> in order to initialize and prepare the project database. 
>> >> 
>> >>   Please enter the name of your project. 
>> >>   This name will be used in page titles and descriptions. 
>> >> 
>> >> Project Name [My Project]> Test 
>> >> 
>> >>   Please specify the connection string for the database to use. 
>> >>   By default, a local SQLite database is created in the environment 
>> >>   directory. It is also possible to use an existing MySQL or 
>> >>   PostgreSQL database (check the Trac documentation for the exact 
>> >>   connection string syntax). 
>> >> 
>> >> Database connection string [sqlite:db/trac.db]> 
>> >> mysql://tracuser:MyPwd@localhost:3306/trac 
>> >> 
>> >> Creating and Initializing Project 
>> >> Initenv for '/var/www/trac/env2' failed. 
>> >> Failed to create environment. 
>> >> Unsupported database type "mysql" 
>> >> Traceback (most recent call last): 
>> >>File "build/bdist.linux-x86_64/egg/trac/admin/console.py", line 
>> 500, in 
>> >> do_initenv 
>> >>  options=options) 
>> >>File "build/bdist.linux-x86_64/egg/trac/core.py", line 136, in 
>> __call__ 
>> >>  self.__init__(*args, **kwargs) 
>> >>File "build/bdist.linux-x86_64/egg/trac/env.py", line 300, in 
>> __init__ 
>> >>  self.create(options) 
>> >>File "build/bdist.linux-x86_64/egg/trac/env.py", line 592, in 
>> create 
>> >>  DatabaseManager(self).init_db() 
>> >>File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 337, in 
>> init_db 
>> >>  connector, args = self.get_connector() 
>> >>File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 615, in 
>> >> get_connector 
>> >>  scheme=scheme)) 
>> >> TracError: Unsupported database type "mysql" 
>> > Could you please try initenv with logging using --inherit option? 
>> > 
>> > $ cat /path/to/inherit.ini 
>> > [logging] 
>> > log_type = stderr 
>> > log_level = DEBUG 
>> > $ trac-admin /path/to/env initenv --inherit=/path/to/inherit.ini 
>> > my-project 'mysql://u:p@localhost/t' 
>> > 
>> > 
>> > In Ubuntu 16.04 on docker, I get the following 2 errors: 
>> > 
>> > Error 1 
>> > === 
>> > 12:55:21 Trac[loader] DEBUG: Loading plugin "trac.db.mysql" from 
>> > "/tmp/venv/lib/python2.7/site-packages" 
>> > 12:55:21 Trac[loader] ERROR: Skipping "trac.db.mysql = 
>> > trac.db.mysql_backend [mysql]": 
>> > Traceback (most recent call last): 
>> >File "/tmp/venv/local/lib/python2.7/site-packages/trac/loader.py", 
>> > line 68, in _load_eggs 
>> >  entry.load(require=True) 
>> >File 
>> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
>> > line 2228, in load 
>> >  self.require(*args, **kwargs) 
>> >File 
>> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
>> > line 2245, in require 
>> >  items = working_set.resolve(reqs, env, installer) 
>> >File 
>> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
>> > line 808, in resolve 
>> >  if not req_extras.markers_pass(req): 
>> >File 
>> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
>> > line 

Re: [Trac] Need help on trac migration 1.0.13 to 1.2.2: TracError: Unsupported database type "mysql"

2017-11-14 Thread RjOllos


On Tuesday, November 14, 2017 at 12:48:20 AM UTC-8, RjOllos wrote:
>
>
>
> On Monday, November 13, 2017 at 10:41:30 PM UTC-8, torgeriedel wrote:
>>
>> Am 13.11.2017 um 14:09 schrieb Jun Omae: 
>> > On Sun, Nov 12, 2017 at 11:41 PM, Torge Riedel <torgerie...@gmx.de> 
>> wrote: 
>> >> Ok, this switched to a general issue. I followed documentation on 
>> >> https://trac.edgewall.org/wiki/TracInstall and then the following 
>> call to 
>> >> initialize a new environment: 
>> >> 
>> >> trac-admin /var/www/trac/env2 initenv 
>> >> 
>> >> Creating a new Trac environment at /var/www/trac/env2 
>> >> 
>> >> Trac will first ask a few questions about your environment 
>> >> in order to initialize and prepare the project database. 
>> >> 
>> >>   Please enter the name of your project. 
>> >>   This name will be used in page titles and descriptions. 
>> >> 
>> >> Project Name [My Project]> Test 
>> >> 
>> >>   Please specify the connection string for the database to use. 
>> >>   By default, a local SQLite database is created in the environment 
>> >>   directory. It is also possible to use an existing MySQL or 
>> >>   PostgreSQL database (check the Trac documentation for the exact 
>> >>   connection string syntax). 
>> >> 
>> >> Database connection string [sqlite:db/trac.db]> 
>> >> mysql://tracuser:MyPwd@localhost:3306/trac 
>> >> 
>> >> Creating and Initializing Project 
>> >> Initenv for '/var/www/trac/env2' failed. 
>> >> Failed to create environment. 
>> >> Unsupported database type "mysql" 
>> >> Traceback (most recent call last): 
>> >>File "build/bdist.linux-x86_64/egg/trac/admin/console.py", line 
>> 500, in 
>> >> do_initenv 
>> >>  options=options) 
>> >>File "build/bdist.linux-x86_64/egg/trac/core.py", line 136, in 
>> __call__ 
>> >>  self.__init__(*args, **kwargs) 
>> >>File "build/bdist.linux-x86_64/egg/trac/env.py", line 300, in 
>> __init__ 
>> >>  self.create(options) 
>> >>File "build/bdist.linux-x86_64/egg/trac/env.py", line 592, in 
>> create 
>> >>  DatabaseManager(self).init_db() 
>> >>File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 337, in 
>> init_db 
>> >>  connector, args = self.get_connector() 
>> >>File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 615, in 
>> >> get_connector 
>> >>  scheme=scheme)) 
>> >> TracError: Unsupported database type "mysql" 
>> > Could you please try initenv with logging using --inherit option? 
>> > 
>> > $ cat /path/to/inherit.ini 
>> > [logging] 
>> > log_type = stderr 
>> > log_level = DEBUG 
>> > $ trac-admin /path/to/env initenv --inherit=/path/to/inherit.ini 
>> > my-project 'mysql://u:p@localhost/t' 
>> > 
>> > 
>> > In Ubuntu 16.04 on docker, I get the following 2 errors: 
>> > 
>> > Error 1 
>> > === 
>> > 12:55:21 Trac[loader] DEBUG: Loading plugin "trac.db.mysql" from 
>> > "/tmp/venv/lib/python2.7/site-packages" 
>> > 12:55:21 Trac[loader] ERROR: Skipping "trac.db.mysql = 
>> > trac.db.mysql_backend [mysql]": 
>> > Traceback (most recent call last): 
>> >File "/tmp/venv/local/lib/python2.7/site-packages/trac/loader.py", 
>> > line 68, in _load_eggs 
>> >  entry.load(require=True) 
>> >File 
>> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
>> > line 2228, in load 
>> >  self.require(*args, **kwargs) 
>> >File 
>> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
>> > line 2245, in require 
>> >  items = working_set.resolve(reqs, env, installer) 
>> >File 
>> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
>> > line 808, in resolve 
>> >  if not req_extras.markers_pass(req): 
>> >File 
>> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
>> > line 993, in markers_pass 
>> >  return not req.marker or any(extra_evals) or req.ma

[Trac] Re: Trac reports

2017-11-14 Thread RjOllos


On Tuesday, November 14, 2017 at 2:55:30 AM UTC-8, Shad wrote:
>
> Hi,
>
> Please someone guide me with this?
>
> I have created a ticket statistics using MySQL query as follows:
>
>
> WITH
>>   cutoff_time(n, usec) AS
>> (SELECT 0,1e6 * (strftime('%s', 'now'))
>>  UNION ALL
>>  SELECT n + 1, usec - (1e6 * 86400 * 7) FROM cutoff_time LIMIT 520),
>>
>>   open_time(id, usec, version) AS
>> (SELECT id, time, version FROM ticket
>>  WHERE version IS "1.0.0" AND type IS 'Bug'),
>>
>>   close_time(id, usec) AS
>> (SELECT ticket, ticket_change.time
>>  FROM ticket_change
>>  LEFT JOIN ticket t ON ticket = t.id
>>  WHERE field = 'status' AND newvalue IN ('closed', 'fixed', 
>> 'invalid', 'duplicate', 'wontfix', 'closed(wontfix)', 'closed(invalid)') 
>> AND version IS '1.0.0' AND type IS 'Bug'
>>  GROUP BY ticket),
>>
>>   num_closed(n, cnt) AS
>> (SELECT n, COUNT(id)
>>  FROM cutoff_time
>>  JOIN close_time ON cutoff_time.usec > close_time.usec
>>  GROUP BY n),
>>
>>   num_opened(n, cnt) AS
>> (SELECT n, COUNT(id)
>>  FROM cutoff_time
>>  JOIN open_time ON cutoff_time.usec > open_time.usec
>>  GROUP BY n)
>>
>> SELECT
>>   date(cutoff_time.usec / 1e6, 'unixepoch') AS 'Date',
>>   num_opened.cnt - IFNULL(num_closed.cnt, 0) AS 'Active',
>>   num_opened.cnt AS 'Opened',
>>   IFNULL(num_closed.cnt, 0) AS 'Closed'
>>   FROM cutoff_time
>>   JOIN num_opened USING (n)
>>   LEFT OUTER JOIN num_closed USING (n)
>>   ORDER BY date
>>
>
> As we can see the logic is very simple, this query counts all the opened 
> tickets and then subtracts the closed tickets, which gives me the number of 
> active tickets. 
>
> But now I found a problem with this code. That it does not count the 
> reopened tickets, I don't understand how would I include even the reopened 
> tickets to Active tickets number.
>
> Any help is much appreciated.
>
> Thanking you & regards,
> Shad
>

Your close time query is counting tickets that have been closed at least 
once in the ticket history. A reopened ticket has been closed, but it's 
current status is not closed. You need to order the ticket change events by 
time and only count tickets in which the most recent change with 
field='status' is in the list of values ('closed', 'fixed', ...).

However, on that last point the query looks a bit odd in that it's checking 
if 'status' has values like 'invalid' and 'duplicate'. In a default Trac 
installation, those are values of the "resolution" field, not the status 
field. It's possible that you've modified your workflow to make those valid 
ticket statuses, but I think it would be an odd configuration. You can 
check with:

$trac-admin /path/to/env resolution list

Possible Values
---
duplicate
worksforme
fixed
invalid
wontfix


Looking at your workflow should also reveal if statues like 'invalid' are 
really valid statuses, or are actually resolutions.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Trac reports

2017-11-14 Thread RjOllos


On Tuesday, November 14, 2017 at 2:55:30 AM UTC-8, Shad wrote:
>
> Hi,
>
> Please someone guide me with this?
>
> I have created a ticket statistics using MySQL query as follows:
>

Per your post on SO, you are running SQLite, not MySQL:
https://stackoverflow.com/questions/47285182/trac-reports-update

- Ryan
 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Need help on trac migration 1.0.13 to 1.2.2: TracError: Unsupported database type "mysql"

2017-11-14 Thread RjOllos


On Monday, November 13, 2017 at 10:41:30 PM UTC-8, torgeriedel wrote:
>
> Am 13.11.2017 um 14:09 schrieb Jun Omae: 
> > On Sun, Nov 12, 2017 at 11:41 PM, Torge Riedel  
> wrote: 
> >> Ok, this switched to a general issue. I followed documentation on 
> >> https://trac.edgewall.org/wiki/TracInstall and then the following call 
> to 
> >> initialize a new environment: 
> >> 
> >> trac-admin /var/www/trac/env2 initenv 
> >> 
> >> Creating a new Trac environment at /var/www/trac/env2 
> >> 
> >> Trac will first ask a few questions about your environment 
> >> in order to initialize and prepare the project database. 
> >> 
> >>   Please enter the name of your project. 
> >>   This name will be used in page titles and descriptions. 
> >> 
> >> Project Name [My Project]> Test 
> >> 
> >>   Please specify the connection string for the database to use. 
> >>   By default, a local SQLite database is created in the environment 
> >>   directory. It is also possible to use an existing MySQL or 
> >>   PostgreSQL database (check the Trac documentation for the exact 
> >>   connection string syntax). 
> >> 
> >> Database connection string [sqlite:db/trac.db]> 
> >> mysql://tracuser:MyPwd@localhost:3306/trac 
> >> 
> >> Creating and Initializing Project 
> >> Initenv for '/var/www/trac/env2' failed. 
> >> Failed to create environment. 
> >> Unsupported database type "mysql" 
> >> Traceback (most recent call last): 
> >>File "build/bdist.linux-x86_64/egg/trac/admin/console.py", line 500, 
> in 
> >> do_initenv 
> >>  options=options) 
> >>File "build/bdist.linux-x86_64/egg/trac/core.py", line 136, in 
> __call__ 
> >>  self.__init__(*args, **kwargs) 
> >>File "build/bdist.linux-x86_64/egg/trac/env.py", line 300, in 
> __init__ 
> >>  self.create(options) 
> >>File "build/bdist.linux-x86_64/egg/trac/env.py", line 592, in create 
> >>  DatabaseManager(self).init_db() 
> >>File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 337, in 
> init_db 
> >>  connector, args = self.get_connector() 
> >>File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 615, in 
> >> get_connector 
> >>  scheme=scheme)) 
> >> TracError: Unsupported database type "mysql" 
> > Could you please try initenv with logging using --inherit option? 
> > 
> > $ cat /path/to/inherit.ini 
> > [logging] 
> > log_type = stderr 
> > log_level = DEBUG 
> > $ trac-admin /path/to/env initenv --inherit=/path/to/inherit.ini 
> > my-project 'mysql://u:p@localhost/t' 
> > 
> > 
> > In Ubuntu 16.04 on docker, I get the following 2 errors: 
> > 
> > Error 1 
> > === 
> > 12:55:21 Trac[loader] DEBUG: Loading plugin "trac.db.mysql" from 
> > "/tmp/venv/lib/python2.7/site-packages" 
> > 12:55:21 Trac[loader] ERROR: Skipping "trac.db.mysql = 
> > trac.db.mysql_backend [mysql]": 
> > Traceback (most recent call last): 
> >File "/tmp/venv/local/lib/python2.7/site-packages/trac/loader.py", 
> > line 68, in _load_eggs 
> >  entry.load(require=True) 
> >File 
> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
> > line 2228, in load 
> >  self.require(*args, **kwargs) 
> >File 
> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
> > line 2245, in require 
> >  items = working_set.resolve(reqs, env, installer) 
> >File 
> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
> > line 808, in resolve 
> >  if not req_extras.markers_pass(req): 
> >File 
> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
> > line 993, in markers_pass 
> >  return not req.marker or any(extra_evals) or req.marker.evaluate() 
> >File 
> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/markers.py",
>  
>
> > line 278, in evaluate 
> >  return _evaluate_markers(self._markers, current_environment) 
> >File 
> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/markers.py",
>  
>
> > line 203, in _evaluate_markers 
> >  lhs_value = _get_env(environment, lhs.value) 
> >File 
> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/markers.py",
>  
>
> > line 185, in _get_env 
> >  "{0!r} does not exist in evaluation environment.".format(name) 
> > UndefinedEnvironmentName: 'extra' does not exist in evaluation 
> environment. 
> > 12:55:21 Trac[loader] DEBUG: Loading plugin "trac.db.postgres" from 
> > "/tmp/venv/lib/python2.7/site-packages" 
> > 12:55:21 Trac[loader] ERROR: Skipping "trac.db.postgres = 
> > trac.db.postgres_backend [postgresql]": 
> > Traceback (most recent call last): 
> >File "/tmp/venv/local/lib/python2.7/site-packages/trac/loader.py", 
> > line 68, in _load_eggs 
> >  entry.load(require=True) 
> >File 
> "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 
> > line 2228, in load 
> >  self.require(*args, **kwargs) 
> >File 
> 

Re: [Trac] Need help on trac migration 1.0.13 to 1.2.2: TracError: Unsupported database type "mysql"

2017-11-13 Thread RjOllos


On Monday, November 13, 2017 at 2:12:02 PM UTC-5, torgeriedel wrote:
>
> Am 13.11.2017 um 12:55 schrieb RjOllos:
>
>
>
> On Sunday, November 12, 2017 at 12:12:11 PM UTC-5, torgeriedel wrote: 
>>
>> Ok, one more test, since trac is using MySQLdb I searched the code and 
>> extracted this short test code. And it works:
>>
>> # python
>> Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
>> [GCC 5.4.0 20160609] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> from trac.util import get_pkginfo
>> >>> import MySQLdb
>> >>> import MySQLdb.cursors
>> >>> mysqldb_version = get_pkginfo(MySQLdb).get('version', 
>> MySQLdb.__version__)
>> >>> print("MySQLdb.version = {}".format(mysqldb_version))
>> MySQLdb.version = 1.3.7
>> >>> con = MySQLdb.connect('localhost', 'tracuser', 'thung0hohF6no3ah', 
>> 'trac')
>> >>> cur = con.cursor()
>> >>> cur.execute("SHOW TABLES")
>> 19L
>> >>> for (table_name) in cur:
>> ...   print("- {}".format(table_name))
>> ... 
>> - ('attachment',)
>> - ('auth_cookie',)
>> - ('cache',)
>> - ('component',)
>> - ('enum',)
>> - ('milestone',)
>> - ('node_change',)
>> - ('permission',)
>> - ('report',)
>> - ('repository',)
>> - ('revision',)
>> - ('session',)
>> - ('session_attribute',)
>> - ('system',)
>> - ('ticket',)
>> - ('ticket_change',)
>> - ('ticket_custom',)
>> - ('version',)
>> - ('wiki',)
>> >>> cur.close()
>> >>> con.close()
>> >>> quit()
>>
>
>
> Here is another command to try from the Python shell:
> >>> from trac.db.mysql_backend import has_mysqldb
> >>> has_mysqldb
> True
> >>> from trac.db.mysql_backend import mysqldb_version
> >>> mysqldb_version
> '1.2.5'
>
> You might have the wrong MySQL database bindings installed. You need this 
> one:
> https://pypi.python.org/pypi/MySQL-python
>
> Going from version numbers, it looks like you have this one:
> https://pypi.python.org/pypi/mysqlclient/1.3.7
>
> Side note, for the forthcoming Trac 1.4 release we've switched to PyMySQL:
> https://trac.edgewall.org/wiki/MySqlDb#Trac1.3.2
>
> and the following may be relevant to your situation:
> https://trac.edgewall.org/ticket/12821#comment:13
>
> - Ryan
>
> -- 
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to trac-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/trac-users.
> For more options, visit https://groups.google.com/d/optout.
>
> Hi Ryan,
>
> you are right it is the "wrong" database binding.
>
> But taking a look at https://pypi.python.org/pypi/MySQL-python/1.2.5 I 
> see, that this is really old (2014-01-02) and does not support MySql > 5.5 
> (as I understand). But Ubuntu 16.04 LTS comes with MySQL 5.7.
>
> Taking a look at https://pypi.python.org/pypi/mysqlclient I read, that 
> this is a fork of the other binding and supports MySQL >= 5.5 and py2.7.
>
> That's why this binding (1.3.7) is installed when I execute apt-get 
> install python-mysqldb and not the older one (1.2.5).
>
> Imho my feeling is that there is currently no chance to get trac running 
> with MySQL on Ubuntu 16.04? Is there any chance to patch "my" Trac 1.2.2 in 
> a way to work with the newer binding?
>
> Regards
> Torge
>

It might be possible to make mysqlclient work with Trac 1.2.x. If you 
follow Jun's guidance in generating debug output, the issue you are 
experiencing might become more obvious.

Your other option would be to install Trac 1.3.2 with PyMySQL, however the 
warnings about of running a 1.3.x release apply:
https://trac.edgewall.org/wiki/TracDownload#LatestDevRelease

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Need help on trac migration 1.0.13 to 1.2.2: TracError: Unsupported database type "mysql"

2017-11-13 Thread RjOllos


On Sunday, November 12, 2017 at 12:12:11 PM UTC-5, torgeriedel wrote:
>
> Ok, one more test, since trac is using MySQLdb I searched the code and 
> extracted this short test code. And it works:
>
> # python
> Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
> [GCC 5.4.0 20160609] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from trac.util import get_pkginfo
> >>> import MySQLdb
> >>> import MySQLdb.cursors
> >>> mysqldb_version = get_pkginfo(MySQLdb).get('version', 
> MySQLdb.__version__)
> >>> print("MySQLdb.version = {}".format(mysqldb_version))
> MySQLdb.version = 1.3.7
> >>> con = MySQLdb.connect('localhost', 'tracuser', 'thung0hohF6no3ah', 
> 'trac')
> >>> cur = con.cursor()
> >>> cur.execute("SHOW TABLES")
> 19L
> >>> for (table_name) in cur:
> ...   print("- {}".format(table_name))
> ... 
> - ('attachment',)
> - ('auth_cookie',)
> - ('cache',)
> - ('component',)
> - ('enum',)
> - ('milestone',)
> - ('node_change',)
> - ('permission',)
> - ('report',)
> - ('repository',)
> - ('revision',)
> - ('session',)
> - ('session_attribute',)
> - ('system',)
> - ('ticket',)
> - ('ticket_change',)
> - ('ticket_custom',)
> - ('version',)
> - ('wiki',)
> >>> cur.close()
> >>> con.close()
> >>> quit()
>


Here is another command to try from the Python shell:
>>> from trac.db.mysql_backend import has_mysqldb
>>> has_mysqldb
True
>>> from trac.db.mysql_backend import mysqldb_version
>>> mysqldb_version
'1.2.5'

You might have the wrong MySQL database bindings installed. You need this 
one:
https://pypi.python.org/pypi/MySQL-python

Going from version numbers, it looks like you have this one:
https://pypi.python.org/pypi/mysqlclient/1.3.7

Side note, for the forthcoming Trac 1.4 release we've switched to PyMySQL:
https://trac.edgewall.org/wiki/MySqlDb#Trac1.3.2

and the following may be relevant to your situation:
https://trac.edgewall.org/ticket/12821#comment:13

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] TRAC project for subfolder off Subversion repository

2017-11-04 Thread RjOllos


On Thursday, March 31, 2016 at 9:37:37 PM UTC-7, RjOllos wrote: 

> Thanks, I thought the feature sounded familiar, but I couldn't find it 
> documented anywhere. I'll review documentation and add some notes if needed.
>
> - Ryan 
>

 Added: 
https://trac.edgewall.org/wiki/1.3/TracRepositoryAdmin?action=diff=16

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: AccountManager: Reset Password problem

2017-11-04 Thread RjOllos


On Tuesday, October 24, 2017 at 3:59:02 AM UTC-7, Andreas wrote:
>
> Hi Ryan,
>
> thanks for your reply.
> I just upgraded to the latest 0.5dev-Version of AccountManager and still 
> have the same issue as previously mentioned:
>

I will take a look again sometime next week. Can you confirm that you are 
using form-based login and not having Apache or another webserver handling 
authentication? This means you won't have a Location directive for a path 
like "/login", as show in:
https://trac.edgewall.org/wiki/TracModWSGI#UsingDigestAuthentication

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Delete ticket comment revision?

2017-10-31 Thread RjOllos


On Tuesday, October 31, 2017 at 6:34:21 PM UTC-7, ilewismsl wrote:
>
> Is there any means in Trac to delete a ticket comment revision, like you 
> can for a wiki page? I know I can delete an entire comment from a ticket. 
> What I would like to be able to do, however, is to delete the latest 
> revision to the comment.
>
> I changed a ticket comment. By mistake, on another tab, I was editing the 
> same comment. When I got to that tab, quite a while after the original 
> change, I committed the changes. But, that actually reverted the comment to 
> what it had been before my latest change. 
>
> Obviously, I can just correct the comment again, I have the history. But, 
> I would rather delete the inadvertent comment change entirely and revert to 
> the previous state of the comment.
>
> Ian Lewis
> www.mstarlabs.com
>

There's an open request for the feature:
https://trac.edgewall.org/ticket/10325

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: trac_captcha plugin error: StringIO() argument 1 must be convertible to a buffer, not Element

2017-10-31 Thread RjOllos


On Tuesday, October 31, 2017 at 12:02:24 AM UTC-7, Mike Dewhirst wrote: 

> > Also, take a look at: 
> > https://trac-hacks.org/tags/captcha?wiki=on 
>
> That list was what prompted me to ask if anyone had any recommendations. 
> If you are recommending SpamFilter I suppose I should install it. It 
> does seem like a sledgehammer to crack a nut.
>

MathCaptchaPlugin looks simple to use:
https://trac-hacks.org/wiki/MathCaptchaPlugin
 

> > Is the issue you encountered due to a spammer editing the CC field 
> > when creating a ticket? 
>
> I don't know. The CC field was empty but I thought the ticket might have 
> been re-saved after a list had been processed. On reflection I might 
> have been a bit hasty in assuming it was a bot trained to recognise Trac 
> sites. The ticket content was definitely spam and included a link to 
> some dodgy-looking website. It might have just been plain spam. 
>

You can see the whole history of field changes to the ticket. You may have 
to toggle the //Show property changes// preference.
 

> I have now removed the TICKET_CREATE and TICKET_EDIT_CC and all other 
> non-view permissions from anonymous users. If they wish to get involved 
> they can obtain authentication. 
>
> I think that solves my "problem" at least until I need to implement 
> self-registration for intending users. 
>

TracAccountManager will eventually be good for that.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: TracKeywordsPlugin - entry field sometimes missing, ticket page incomplete

2017-10-31 Thread RjOllos


On Tuesday, October 31, 2017 at 6:47:51 AM UTC-7, Clemens Feige wrote:
>
>
> RjOllos wrote on 29.10.2017 at 22:32: 
> > 
> > 
> > On Sunday, October 29, 2017 at 4:52:37 AM UTC-7, Clemens Feige wrote: 
> >> 
> >> 
> >> RjOllos wrote on 27.10.2017 at 20:45: 
> >>> 
> >>> 
> >>> On Friday, October 27, 2017 at 9:09:02 AM UTC-7, RjOllos wrote: 
> >>>> 
> >>>> 
> >>>> 
> >>>> On Friday, October 27, 2017 at 4:09:46 AM UTC-7, Clemens Feige wrote: 
> >>>>> 
> >>>>> Hello 
> >>>>> 
> >>>>> I am using the TracKeywordsPlugin which generates an "Add Keywords" 
> >>>>> entry field at the bottom of each ticket HTML page. It works 
> properly 
> >>>>> most of the time, but sometimes this entire field is missing. What 
> may 
> >>>>> be the reason? 
> >>>>> 
> >>>>> https://trac-hacks.org/wiki/TracKeywordsPlugin 
> >>>>> 
> >>>>> Independent from this particular plugin, what mechanism may prevent 
> >>>>> that a plugin may execute? 
> >>>>> (Please note that generally it works, but not always.) 
> >>>>> 
> >>>>> How shall I investigate plugin problems? 
> >>>>> 
> >>>>> Maybe it depends on which Apache server instance is used by the 
> >>>>> particular client (although I restarted Apache, see below...) 
> >>>>> 
> >>>>> Some more details: 
> >>>>> 
> >>>>> 1. 
> >>>>> We have TRAC version 1.0.4 running on Linux with Apache server. 
> >>>>> Clients 
> >>>>> are under Windows with Firefox browser. The plugin is installed as 
> >>>>> Python-Egg file in the plugin-directory of the TRAC repo. 
> >>>>> 
> >>>>> 2. 
> >>>>> Of course it looks like browser cache problem. But this cannot be 
> the 
> >>>>> root cause, 
> >>>>> - because it happens also with tickets which I never visited 
> >>>>> before. 
> >>>>> - reloading the page does not help (Firefox, press F5 twice) 
> >>>>> - totally different browser has same issue 
> >>>>> 
> >>>>> 3. 
> >>>>> Restarting the Apache-Server and reloading the page cures the 
> problem. 
> >>>>> But after a while it re-appears with other tickets. 
> >>>>> 
> >>>>> 4. 
> >>>>> Log-file does not show any plugin errors. 
> >>>>> 
> >>>>> Thanks for help 
> >>>>> Clemens 
> >>>>> 
> >>>> 
> >>>> Any errors in the browser console? 
> >>>> 
> >>>> 
> https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheBrowserConsole 
> >>>> 
> >>>> TracKeywords should be modified to so that it doesn't use a Genshi 
> >>>> Transformer. I will make some changes to the code today. 
> >>>> 
> >>>> - Ryan 
> >>>> 
> >>> 
> >>> Please try the latest from TracKeywords trunk. I modified the plugin 
> so 
> >>> that Genshi Transformer is no longer used. 
> >>> https://trac-hacks.org/changeset/16925 
> >>> 
> >>> - Ryan 
> >>> 
> >> 
> >> Hello Ryan 
> >> 
> >> I appreciate very much your work and r16925 renovation of the 
> >> TracKeywords plugin. Good work! 
> >> 
> >> Anyway, using the latest trunk revision r16925 I still frequently miss 
> >> the entire keyword field. Sometimes it is there, sometimes not. Miss 
> >> rate is approx. 25%. 
> >> 
> >> The browser console does not show anything related to TracKeywords. 
> >> 
> >> I can confirm the issue with different browsers, on different machines, 
> >> with different Trac repos (but all on same server). 
> >> 
> >> What makes this issue mysterious to me is that it is an intermediate 
> >> problem. It occurs only from time to time. May this be related to the 
> >> server-side state of the Apache-server? 
> >> Do you think it is worth to test with the trac-build-in webserver? 
> >> I have no idea ... 
> >> 
> >> Thanks 
> >> Clemens 
> >> 

[Trac] Re: About Modify Ticket section

2017-10-30 Thread RjOllos


On Monday, October 23, 2017 at 10:04:58 AM UTC-7, ponm...@gmail.com wrote:
>
> Hi,
>
> I am using Trac 1.0.2. I tried creating "site.html" with reference to the 
> following tickets,
> "Modify Ticket" section can not be opened automatically.
>
> # 9807 (Wrong sections are collapsed by default!) - The Trac Project
> https://trac.edgewall.org/ticket/9807#comment:17
>
> Is it okay with the same procedure with Trac 1.0.x?
>

Yes, it works with 1.0.x. Did you restart your webserver after making the 
change?

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: trac_captcha plugin error: StringIO() argument 1 must be convertible to a buffer, not Element

2017-10-30 Thread RjOllos


On Sunday, October 29, 2017 at 4:08:13 PM UTC-7, Mike Dewhirst wrote:
>
> *Trac detected an internal error:* 
>
> TypeError: StringIO() argument 1 must be convertible to a buffer, not 
> Element 
>

I'll take a look. Please post the traceback from the log.
 

> I'm using Trac 1.2 and note that the plugin only seems compatible with 
> Trac 1.0 so I guess I can't expect there to be a fix for this already. 
>
> Does anyone have a recommendation for a plugin with 1.2 compatibility?
>

https://trac.edgewall.org/wiki/SpamFilter

Also, take a look at:
https://trac-hacks.org/tags/captcha?wiki=on
 

> A spammer created a ticket yesterday and I have no idea how many emails 
> might have been sent via the cc field. 
>
> Is there a way I can limit the number of emails sent via the cc field? 
>

I think your best move is to limit edits to the CC field. For example, 
don't grant TICKET_EDIT_CC to untrusted users.

Users with TICKET_CREATE can edit the CC field for new tickets even if they 
don't have TICKET_EDIT_CC. That could be dealt with a few different ways, 
such as implementing ITicketManipulator.
https://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.ticket.api.ITicketManipulator

Is the issue you encountered due to a spammer editing the CC field when 
creating a ticket?

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Report grouping

2017-10-30 Thread RjOllos


On Monday, October 30, 2017 at 8:34:27 AM UTC-7, Shad wrote:
>
>
>
> On Monday, October 30, 2017 at 12:55:02 PM UTC+1, Shad wrote:
>>
>>
>> 
>> Hi,
>>
>> I wanted to create a report statistics based on version, thus I used this 
>> code to do the following:
>>
>> WITH
>>   cutoff_time(n, usec) AS
>> (SELECT 0,1e6 * (strftime('%s', 'now'))
>>  UNION ALL
>>  SELECT n + 1, usec - (1e6 * 86400 * 7) FROM cutoff_time LIMIT 520),
>>
>>   custom_time(id, usec, version, priority) AS
>> (SELECT id, time, version, priority FROM ticket
>>  WHERE version IS "1.0" AND priority IN ("major", "Critical") AND 
>> status NOT IN ("closed", "invalid", "fixed", "duplicate", "wontfix")
>>  GROUP BY id),
>>
>>   open_time(id, usec,version) AS
>> (SELECT id, time, version FROM ticket
>>  WHERE version IS "1.0"),
>>
>>   close_time(id, usec, version) AS
>> (SELECT id, MAX(time), version
>>  FROM ticket
>>  WHERE status IN ('closed', 'fixed', 'invalid', 'duplicate', 
>> 'wontfix', 'closed(wontfix)', 'closed(invalid)') AND version IS '1.0'
>>  GROUP BY id),
>>
>>   num_closed(n, cnt) AS
>> (SELECT n, COUNT(id)
>>  FROM cutoff_time
>>  JOIN close_time ON cutoff_time.usec > close_time.usec
>>  GROUP BY n),
>>
>>   num_opened(n, cnt) AS
>> (SELECT n, COUNT(id)
>>  FROM cutoff_time
>>  JOIN open_time ON cutoff_time.usec > open_time.usec
>>  GROUP BY n),
>>  
>>   num_custom(n, cnt) AS
>> (SELECT n, COUNT(id)
>>  FROM cutoff_time
>>  JOIN custom_time ON cutoff_time.usec > custom_time.usec
>>  GROUP BY n)
>>
>> SELECT
>>   date(cutoff_time.usec / 1e6, 'unixepoch') AS 'Date',
>>   num_custom.cnt AS 'Critical_&_Major_Tickets',
>>   num_opened.cnt - IFNULL(num_closed.cnt, 0) AS 'Active',
>>   num_opened.cnt AS 'ALL_Tickets',
>>   IFNULL(num_closed.cnt, 0) AS 'Closed'
>>   FROM cutoff_time 
>>   JOIN num_custom USING (n)
>>   LEFT OUTER JOIN num_opened USING (n)
>>   LEFT OUTER JOIN num_closed USING (n)
>>   ORDER BY date
>>
>> But using this I cannot group the tickets properly. I mean the tickets 
>> are merging irrespective of time. For example if I create a ticket on week 
>> 1 and close it in week 2 , it is been counted for week 1 and week 2 i.e, 
>> the active tickets number for week 1 which should be 1 is changing to zero 
>> even if it is closed during week 2. 
>>
>> In the attached image one can see that the 2 tickets were opened on 
>> 10/07/2017 and was closed on 30/10/2017 but the closed tickets are also 
>> being counted for other days from 10/07/2017 to 30/10/2017 
>>
>> Please guide me in this regard, I am sure that there is a problem of 
>> grouping.
>>
>> Thanking you & regards,
>> Shad
>>
>
> I have edited the query in the following way:
>
>   close_time(id, usec) AS
> (SELECT ticket, MAX(time) AS modified
>  FROM ticket_change
>  INNER JOIN ticket tc ON id = ticket
>  WHERE field = 'status' AND newvalue IN ('closed', 'fixed', 'invalid', 
> 'duplicate', 'wontfix', 'closed(wontfix)', 'closed(invalid)') AND version IS 
> '2.0.0' AND type IS 'Bug'
>  GROUP BY ticket), 
>
> But I have an ambiguity error for 'time' and its normal since the component 
> 'time' exists in both the tables. But how I do overcome it? Any help is 
> appreciated.
>
> P.S: I used the following for the table datasets 
> https://trac.edgewall.org/wiki/TracDev/DatabaseSchema/TicketSystem#Tableticket
>  
>
> Regards,
> Shad
>
>

Use as alias for ticket: "ticket t" or "ticket AS t", and reference the 
column as "t.time". Use a different alias for the table with the 
conflicting time column.

https://en.wikipedia.org/wiki/Alias_(SQL)

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: TracKeywordsPlugin - entry field sometimes missing, ticket page incomplete

2017-10-29 Thread RjOllos


On Sunday, October 29, 2017 at 4:52:37 AM UTC-7, Clemens Feige wrote:
>
>
> RjOllos wrote on 27.10.2017 at 20:45: 
> > 
> > 
> > On Friday, October 27, 2017 at 9:09:02 AM UTC-7, RjOllos wrote: 
> >> 
> >> 
> >> 
> >> On Friday, October 27, 2017 at 4:09:46 AM UTC-7, Clemens Feige wrote: 
> >>> 
> >>> Hello 
> >>> 
> >>> I am using the TracKeywordsPlugin which generates an "Add Keywords" 
> >>> entry field at the bottom of each ticket HTML page. It works properly 
> >>> most of the time, but sometimes this entire field is missing. What may 
> >>> be the reason? 
> >>> 
> >>> https://trac-hacks.org/wiki/TracKeywordsPlugin 
> >>> 
> >>> Independent from this particular plugin, what mechanism may prevent 
> that 
> >>> a plugin may execute? (Please note that generally it works, but not 
> >>> always.) 
> >>> 
> >>> How shall I investigate plugin problems? 
> >>> 
> >>> Maybe it depends on which Apache server instance is used by the 
> >>> particular client (although I restarted Apache, see below...) 
> >>> 
> >>> Some more details: 
> >>> 
> >>> 1. 
> >>> We have TRAC version 1.0.4 running on Linux with Apache server. 
> Clients 
> >>> are under Windows with Firefox browser. The plugin is installed as 
> >>> Python-Egg file in the plugin-directory of the TRAC repo. 
> >>> 
> >>> 2. 
> >>> Of course it looks like browser cache problem. But this cannot be the 
> >>> root cause, 
> >>>- because it happens also with tickets which I never visited 
> before. 
> >>>- reloading the page does not help (Firefox, press F5 twice) 
> >>>- totally different browser has same issue 
> >>> 
> >>> 3. 
> >>> Restarting the Apache-Server and reloading the page cures the problem. 
> >>> But after a while it re-appears with other tickets. 
> >>> 
> >>> 4. 
> >>> Log-file does not show any plugin errors. 
> >>> 
> >>> Thanks for help 
> >>> Clemens 
> >>> 
> >> 
> >> Any errors in the browser console? 
> >> 
> https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheBrowserConsole 
> >> 
> >> TracKeywords should be modified to so that it doesn't use a Genshi 
> >> Transformer. I will make some changes to the code today. 
> >> 
> >> - Ryan 
> >> 
> > 
> > Please try the latest from TracKeywords trunk. I modified the plugin so 
> > that Genshi Transformer is no longer used. 
> > https://trac-hacks.org/changeset/16925 
> > 
> > - Ryan 
> > 
>
> Hello Ryan 
>
> I appreciate very much your work and r16925 renovation of the 
> TracKeywords plugin. Good work! 
>
> Anyway, using the latest trunk revision r16925 I still frequently miss 
> the entire keyword field. Sometimes it is there, sometimes not. Miss 
> rate is approx. 25%. 
>
> The browser console does not show anything related to TracKeywords. 
>
> I can confirm the issue with different browsers, on different machines, 
> with different Trac repos (but all on same server). 
>
> What makes this issue mysterious to me is that it is an intermediate 
> problem. It occurs only from time to time. May this be related to the 
> server-side state of the Apache-server? 
> Do you think it is worth to test with the trac-build-in webserver? 
> I have no idea ... 
>
> Thanks 
> Clemens 
>

Next time you see the issue, view the page source and look whether the 
keywords have been added to the page in the trac_keywords array, and if the 
trac_keywords.js file has been added in a script tag.

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: TracKeywordsPlugin - entry field sometimes missing, ticket page incomplete

2017-10-27 Thread RjOllos


On Friday, October 27, 2017 at 9:09:02 AM UTC-7, RjOllos wrote:
>
>
>
> On Friday, October 27, 2017 at 4:09:46 AM UTC-7, Clemens Feige wrote:
>>
>> Hello 
>>
>> I am using the TracKeywordsPlugin which generates an "Add Keywords" 
>> entry field at the bottom of each ticket HTML page. It works properly 
>> most of the time, but sometimes this entire field is missing. What may 
>> be the reason? 
>>
>> https://trac-hacks.org/wiki/TracKeywordsPlugin 
>>
>> Independent from this particular plugin, what mechanism may prevent that 
>> a plugin may execute? (Please note that generally it works, but not 
>> always.) 
>>
>> How shall I investigate plugin problems? 
>>
>> Maybe it depends on which Apache server instance is used by the 
>> particular client (although I restarted Apache, see below...) 
>>
>> Some more details: 
>>
>> 1. 
>> We have TRAC version 1.0.4 running on Linux with Apache server. Clients 
>> are under Windows with Firefox browser. The plugin is installed as 
>> Python-Egg file in the plugin-directory of the TRAC repo. 
>>
>> 2. 
>> Of course it looks like browser cache problem. But this cannot be the 
>> root cause, 
>>   - because it happens also with tickets which I never visited before. 
>>   - reloading the page does not help (Firefox, press F5 twice) 
>>   - totally different browser has same issue 
>>
>> 3. 
>> Restarting the Apache-Server and reloading the page cures the problem. 
>> But after a while it re-appears with other tickets. 
>>
>> 4. 
>> Log-file does not show any plugin errors. 
>>
>> Thanks for help 
>> Clemens 
>>
>
> Any errors in the browser console?
> https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheBrowserConsole
>
> TracKeywords should be modified to so that it doesn't use a Genshi 
> Transformer. I will make some changes to the code today.
>
> - Ryan
>

Please try the latest from TracKeywords trunk. I modified the plugin so 
that Genshi Transformer is no longer used.
https://trac-hacks.org/changeset/16925

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: TracKeywordsPlugin - entry field sometimes missing, ticket page incomplete

2017-10-27 Thread RjOllos


On Friday, October 27, 2017 at 4:09:46 AM UTC-7, Clemens Feige wrote:
>
> Hello 
>
> I am using the TracKeywordsPlugin which generates an "Add Keywords" 
> entry field at the bottom of each ticket HTML page. It works properly 
> most of the time, but sometimes this entire field is missing. What may 
> be the reason? 
>
> https://trac-hacks.org/wiki/TracKeywordsPlugin 
>
> Independent from this particular plugin, what mechanism may prevent that 
> a plugin may execute? (Please note that generally it works, but not 
> always.) 
>
> How shall I investigate plugin problems? 
>
> Maybe it depends on which Apache server instance is used by the 
> particular client (although I restarted Apache, see below...) 
>
> Some more details: 
>
> 1. 
> We have TRAC version 1.0.4 running on Linux with Apache server. Clients 
> are under Windows with Firefox browser. The plugin is installed as 
> Python-Egg file in the plugin-directory of the TRAC repo. 
>
> 2. 
> Of course it looks like browser cache problem. But this cannot be the 
> root cause, 
>   - because it happens also with tickets which I never visited before. 
>   - reloading the page does not help (Firefox, press F5 twice) 
>   - totally different browser has same issue 
>
> 3. 
> Restarting the Apache-Server and reloading the page cures the problem. 
> But after a while it re-appears with other tickets. 
>
> 4. 
> Log-file does not show any plugin errors. 
>
> Thanks for help 
> Clemens 
>

Any errors in the browser console?
https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheBrowserConsole

TracKeywords should be modified to so that it doesn't use a Genshi 
Transformer. I will make some changes to the code today.

- Ryan
 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] How to Remove Environments? Possible Bug?

2017-10-18 Thread RjOllos


On Wednesday, October 18, 2017 at 10:51:02 AM UTC-7, Joakim Reck wrote:
>
> Hi RjOllos and other wiki workers
>
> May i suggest you add a wiki like wiki/remove_environment as I have 
> searched exactly this information for hours... just to find it in a bug 
> report :(
>

https://trac.edgewall.org/wiki/1.3/TracEnvironment?action=diff=5 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: SVN post-commit hook with Trac command on PostgreSQL DB

2017-10-14 Thread RjOllos


On Saturday, October 14, 2017 at 8:14:52 PM UTC-7, Nicolas MARTIN wrote:
>
> I oversee 2 different projects under the same Trac, one is the major and 
> the second is a smaller side project. Each project manage its own plugins 
> under its environment and doesn't inherit much resources from the Trac 
> installation. Only packages for a decent state (Pygments and pytz in 
> particular).
>
> So I've improved a lot the major one with a few tens of plugins installed 
> altogether since I took over control of this, the small one has about 10.
> At the beginning, the gap was already there but the sum of plugins 
> certainly made it worse.
>
>
> Nicolas
>

Some of the permission-related plugins (e.g. PrivateTicketsPlugin) have 
shown poor performance. I think we may have resolved the issue in Trac 1.2.

If you get around to improving performance later on, you may want to post 
the plugin list for review. Something might stand out and we might arrive 
at a solution without the work of profiling the installation.

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: SVN post-commit hook with Trac command on PostgreSQL DB

2017-10-14 Thread RjOllos


On Saturday, October 14, 2017 at 1:21:22 PM UTC-7, Nicolas MARTIN wrote:
>
>
> On 14/10/2017 02:52, Ryan Ollos wrote:
>
>
>
> On Fri, Oct 13, 2017 at 4:50 PM, Nicolas MARTIN  
> wrote:
>
>> Well I admit that I'm a bit relieved by your response because I was 
>> afraid it was a trivial issue.
>>
>> My plan wasn't to refactor the post-commit script but I really want to 
>> add this functionality.
>> Our web server has very bad performances in loading pages so I think our 
>> developers should enjoy it for closing tickets.
>>
> Any idea why the web server performance is bad? If only Trac has the poor 
> performance, that could be due to configuration or Trac plugins. It might 
> be worth looking at more closely.
>  
>
>> That's funny because SVN is one of the things in our server that are not 
>> too outdated (1.8.8) so I will probably try your second solution.
>> I'll give you a feedback.
>>
> -- 
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to trac-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/trac-users.
> For more options, visit https://groups.google.com/d/optout.
>
> This is another subject I plan to work on in the near future, probably it 
> requires another discussion thread I think.
>
> We are hosted on a multi-project Trac installation, and the Apache server 
> has been configured with CGI which seems to be the worst solution in terms 
> of performance. Despite this and the fact that we are one of the most 
> active projects, I'm always a bit puzzle by the gap when I browse to 
> another project. I mean we are on the same server with the same database, 
> but from a user perspective it seems to be 2 distinct installations.
>
> A while back, I made some researches to find some guidances on how to 
> diagnostic and investigate things on a standalone Trac but I didn't find 
> much.
>

Yeah, I'd switch to mod_wsgi.

Most likely reason for difference would be an active plugin in the slower 
environment. Do both Trac environments have the same active plugins?

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: SVN post-commit hook with Trac command on PostgreSQL DB

2017-10-13 Thread RjOllos


On Friday, October 13, 2017 at 12:04:41 PM UTC-7, Nicolas MARTIN wrote:
>
> Hello Trac users, 
>
>
> I'd like to add the commit ticket updater feature to our project so I 
> followed the instructions from 
> https://trac.edgewall.org/wiki/CommitTicketUpdater and then 
> https://trac.edgewall.org/wiki/1.0/TracRepositoryAdmin in order to 
> enable explicit repository synchronisation. 
>
> Under svn directory, I appended a existing Perl script used for emailing 
> commit notification with the next lines: 
>
> ## Explicit repository synchronization for updating ticket based on commit 
> log message ('Commit Ticket Updater') 
> my @cmd = ('/usr/bin/trac-admin'); 
> push @cmd, '/path/to/project/trac'; 
> push @cmd, "changeset added $ARGV[0] $ARGV[1]"; 
> system(@cmd) == 0 or die "Python 'post-commit' script returned error $?"; 
>
> When pushing a commit, a developer get the error message: 
>
> Warning: post-commit hook failed (exit code 2) with output: 
>
> Error: TimeoutError: Unable to get database connection within 0 seconds. 
> (TracError: Database "/path/to/project/trac/db/trac.db" not found.) 
>
> When I made some tests under project user, I had no issue because 
> trac-admin knows that we are on a PostgreSQL DB with database option in 
> trac.ini. I even made an utter test with a void environment (seems no 
> user environment variable) : 
>
> $ env - /usr/bin/perl ./post-commit /path/to/project/svn $rev 
>
> Does somebody have a clue how I can get this post-commit hook working ? 
>


That error is puzzling if your [trac] database string points to a 
PostgreSQL database. I haven't seen that one before.

I would use trac-svn-hook. I added documentation for it in Trac 1.2, but 
the documentation should be applicable to Trac 1.0 as well:
https://trac.edgewall.org/wiki/TracRepositoryAdmin#Subversion

If you are on SVN 1.8 or later you can use hooks-env variables 
configuration, using documentation for the forthcoming Trac 1.4 and 
trac-svn-hook from the trunk. It should also be backward compatible with 
Trac 1.0.
https://trac.edgewall.org/browser/trunk/contrib/trac-svn-hook
https://trac.edgewall.org/wiki/1.3/TracRepositoryAdmin#Subversion
https://trac.edgewall.org/ticket/12771

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: AccountManager: Reset Password problem

2017-10-12 Thread RjOllos


On Sunday, August 20, 2017 at 12:18:44 PM UTC-7, Andreas wrote:
>
> thank you, seems like I forgot to add 
>
> verify_email = false
>
>
> Does anyone know something about the not working email reset in Trac 
> 1.2.2? (my first question)
>

First, please upgrade to the latest TracAccountManager 0.5dev. Your issue 
may be fixed by recent changes.

If the issue persists, please describe in more detail what you mean by "not 
working".

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Purge session command stuck in the process

2017-10-11 Thread RjOllos


On Wednesday, October 11, 2017 at 3:33:23 AM UTC-7, Nicolas MARTIN wrote:
>
> There was no surprise regarding the number of sessions removed (almost 
> zero),  the site has been released publicly a few months ago.
> My command was just for testing purpose but I didn't expect it would take 
> some much time with no substantial operations on the db.
>
> In fact, we have a mean of 500 sessions created per day since putting it 
> online. I decided to cut by half and kept the sessions only since 
> September, 
> I'm not sure if we have an interest of keeping them.
>
> The weird thing is that the command took about 4 mins while parsing the 
> same number of sessions.
>
>
> Nicolas
>

You could see what queries are being executed by setting:

[logging]
log_level = DEBUG

[trac]
debug_sql  = enabled

You should get just two queries:

11:23:58 Trac[util] DEBUG: SQL:
DELETE FROM session
WHERE authenticated=0 AND last_visit<%s

11:23:58 Trac[util] DEBUG: args: (1444674238,)
11:23:58 Trac[util] DEBUG: prefetch: 0 rows
11:23:58 Trac[util] DEBUG: SQL:
DELETE FROM session_attribute
WHERE authenticated=0
  AND sid NOT IN (SELECT sid FROM session
  WHERE authenticated=0)

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Purge session command stuck in the process

2017-10-10 Thread RjOllos


On Tuesday, October 10, 2017 at 1:49:30 PM UTC-7, Nicolas MARTIN wrote:
>
> Well finally the system completed the command (almost 8 minutes)
>
> '
>
> 22:35:40 Trac[tracdb] DEBUG: "FormDBComponent" does not need a schema 
> upgrade.
>
> real8m25.808s
> user0m0.850s
> sys0m0.080s
>
> '
>
> The funny thing is that it has removed almost none sessions during that 
> time :-/
>

Approximately how many sessions were removed?

It might be that the datetime format you used is not correct for your host. 
You can see the valid localized format in the help text:
$trac-admin ../tracenvs/proj-1.0 help session purge

session purge 

Purge anonymous sessions older than the given age or date

Age may be specified as a relative time like "90 days ago", or as a 
date in
the "MMM d, y, h:mm:ss a" or "-MM-DDThh:mm:ss±hh:mm" (ISO 8601) 
format.


You could use "3 years ago" for the age, to get close to the effect of 
"01/01/15 00:00:00" 

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Blank project pages after upgrading Trac

2017-10-09 Thread RjOllos


On Monday, October 9, 2017 at 9:12:30 AM UTC-7, Boris wrote:
>
> Hi,
>
> I just upgraded our old Trac server from 1.0 to 1.2.2. Everything worked 
> find until we wanted to view a ticket from any project. Then we got an 
> error related to the TracMasterTickets plugin.
> So I updated this plugin to its last version (4.0) and suddenly, I can't 
> see any project page anymore, all are blanks. Even when I use the 
> stabdalone "tracd --port 8000 /path/to/myproject" command.
> I uninstalled TracMasterTickets but the problem still occurs.
>
> For information, we are using an Apache server with mod_wsgi, but the 
> problem seems to resides elsewhere since a standalone server using tracd 
> does not work itself...
>
> Did any of you already encounter a similar problem and found a solution? 
> If so, I would greatly appreciate it!
>

I'd start by checking the logs:
https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheLogs

If you find nothing there, check your Apache logs.

If you've not read TracUpgrade, that may provide some hints about a missed 
step.
https://trac.edgewall.org/wiki/TracUpgrade

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Populate multiselect options with milestone names

2017-10-06 Thread RjOllos


On Friday, October 6, 2017 at 6:45:54 AM UTC-7, andrea knight wrote:
>
> I believe what I am trying to do, is (almost) exactly this
>
> [ticket-custom]
>
> exists_in text
> exists_in.format = list
> exists_in.label = Exists_In
> exists_in.multiselect = true
> exists_in.options = [[MilestoneQuery(%rc_%,,)]]
>
> where Milestone query returns the correctly formatted list of milestones.
>

I'm not familiar with any plugins that help with that at this time.

In #11469 we may add an ICustomFieldProvider interface, which could assist 
with implementing a custom plugin to satisfy your feature request.
https://trac.edgewall.org/ticket/11469

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Populate multiselect options with milestone names

2017-10-05 Thread RjOllos


On Thursday, October 5, 2017 at 4:03:44 AM UTC-7, andrea knight wrote:
>
> HI Ryan,
>
> I have installed MultiSelectFieldPlugin., but I am not sure if syntax 
> already exists to query the database for current milestone values?  
> I have tried the syntax from SQLAlchemy plugin, but I have not been able 
> to get that working.
>
> If syntax does not exist, I can extend the MultiSelectFieldPlugin.
>

You want to query the milestone from a custom field? Could you give some 
more details?

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Populate multiselect options with milestone names

2017-10-04 Thread RjOllos

You could try:

https://trac-hacks.org/wiki/MultiSelectFieldPlugin

The feature is not yet available without using a plugin. 

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Reports for particular version

2017-10-02 Thread RjOllos


On Monday, October 2, 2017 at 9:09:17 AM UTC-7, Shad wrote:
>
> Hi,
>
> I am a new user to TRAC and SQL knowledge is NULL. I wanted to create a 
> report statistics for opened, closed and Active tickets based on ticket 
> version.
>
> For a general global statistics of tickets, I followed this link: 
> https://trac-hacks.org/wiki/DygraphsVisualizationPlugin 
>
> But now I would like to have a specific report for a specific version (for 
> example version: 2.0)
>
> How do I do it? Any help is much appreciated.
>
> Regards,
> Shad
>

I'm not familiar with that plugin. Can it use a saved custom query rather 
than an SQL report? It is simple to make a saved custom query for a 
specific version.
https://trac.edgewall.org/wiki/TracQuery

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] trac-code-comments-plugin:Uncaught ReferenceError: id is not defined

2017-10-02 Thread RjOllos


On Monday, October 2, 2017 at 2:21:02 AM UTC-7, Roger Oberholtzer wrote:
>
> On Sat, Sep 30, 2017 at 7:51 AM, RjOllos <rjol...@gmail.com> wrote: 
>
> > You can try the new version of the plugin: 
> > https://github.com/trac-hacks/trac-code-comments-plugin 
> > 
> > Please don't install on a production system at this time. The plugin 
> needs 
> > testing. 
> > 
> > If you find any issues, please open a ticket in the trac-hacks GitHub 
> > repository for the plugin. 
>
> Interesting plugin. I added the latest and the reported problem seems 
> corrected. 
>
> OOC, is it really the case that one needs TRAC_ADMIN privileges to see 
> the /code-comments page? Or to be able to delete a comment that you 
> yourself made?
>

I didn't look closely at that behavior, but it should be simple enough to 
change by adding a delete permission.
 

> Subscription stuff also needs jquery. But it seems not to use whatever 
> one all the other plugins use. Maybe they each use their own copy? I 
> did not see a list of required things this plugin needs. 
>

I removed the bundled jQuery. I tried removing the bundled jQuery UI but 
that was a breaking change and I didn't investigate further what changes 
are needed.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Email verification on trac-hacks.org

2017-09-30 Thread RjOllos


On Monday, February 29, 2016 at 7:06:54 PM UTC-8, RjOllos wrote:
>
> According to at least two users there is a problem with email 
> verifications on trac-hacks.org. If you are encountering the issue please 
> email me directly and I'll fix the issue for your account, and then 
> eventually I hope to fix the defect or configuration issue with 
> AccountManagerPlugin.
>
> My email address can be found here: https://trac-hacks.org/wiki/rjollos
>
> Thanks,
> - Ryan
>

Also would be useful to hear from anyone that is reliably receiving email 
from trac-hacks.org. 

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] trac-code-comments-plugin:Uncaught ReferenceError: id is not defined

2017-09-29 Thread RjOllos


On Sunday, March 26, 2017 at 7:20:36 PM UTC-7, Mingxing Tian wrote:
>
>
>
> 在 2017年3月27日星期一 UTC+8上午6:05:20,RjOllos写道:
>>
>>
>>
>> On Sunday, March 26, 2017 at 2:49:11 PM UTC-7, RjOllos wrote:
>>>
>>>
>>>
>>> On Friday, March 24, 2017 at 11:34:45 PM UTC-7, Mingxing Tian wrote:
>>>>
>>>>
>>>>
>>>> 在 2017年3月25日星期六 UTC+8下午2:29:48,RjOllos写道:
>>>>>
>>>>> From: Mingxing Tian
>>>>> Sent: Friday, March 24, 23:17
>>>>> Subject: [Trac] trac-code-comments-plugin:Uncaught ReferenceError: id 
>>>>> is not defined
>>>>> To: Trac Users
>>>>>
>>>>> I think it is javascript, please help fix it as soon as possible.
>>>>>
>>>>> Where is the source code for that plugin? Please give a URL.
>>>>>
>>>>> -Ryan
>>>>>
>>>>
>>>> github:`https://github.com/Automattic/trac-code-comments-plugin` 
>>>> <https://github.com/Automattic/trac-code-comments-plugin>
>>>>
>>>> This plugin is very important to me because our team needs to record 
>>>> the results of the review when doing the code review. This plugin may make 
>>>> the record change easier. To tell the truth, I have discussed the way to 
>>>> create a new order and record the problem. Kind of way a bit old fashioned
>>>>
>>>
>>>
>>> Are you running the latest version of the plugin? It appears the issue 
>>> was reported here, and said to be fixed:
>>> https://github.com/Automattic/trac-code-comments-plugin/issues/37
>>>
>>> - Ryan
>>>
>>
>> Looks more closely at issue 37, they claim the fix is in the unmerged 
>> pull request:
>> https://github.com/Automattic/trac-code-comments-plugin/pull/26
>> If that fixes the issue for you, you should ask them to merge it.
>>
>> The author claims they are still maintaining the plugin:
>> https://github.com/Automattic/trac-code-comments-plugin/issues/53
>> If there's no reply or movement I may just fork it to the trac-hacks org 
>> in a few weeks.
>>
>> It looks like the plugin is incompatible with Trac 1.2:
>>
>> https://github.com/Automattic/trac-code-comments-plugin/blob/master/code_comments/comment.py#L131
>>
>> - Ryan
>>  
>>
>
> I am sure I am using the latest version because I have recently installed 
> this plugin.
> It is possible that this plugin does not support the latest version of 
> Trac because the plugin uses a low version of the thing.  AttributeError: 
> 'Environment' object has no attribute '*get_db_cnx*'
>

You can try the new version of the plugin:
https://github.com/trac-hacks/trac-code-comments-plugin

Please don't install on a production system at this time. The plugin needs 
testing.

If you find any issues, please open a ticket in the trac-hacks GitHub 
repository for the plugin.

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: multiple projects transition from a single project

2017-09-27 Thread RjOllos


On Wednesday, September 27, 2017 at 4:07:40 PM UTC-7, Mike Dewhirst wrote:
>
> Where do I send the beer? Red wine? Money? 
>
> That worked. 
>

Excellent. I'll get in touch when I'm in your neighborhood ;) Australia?
 

> But I don't necessarily understand what happened. The passwords were 
> originally created with htpasswd not htdigest. Is there no difference? 
>

hash_method is used by ResetPwStore for password reset. If you are't used 
Password reset then no need to worry. I think there may be some poor 
handling of the configuration options that results in the behavior you are 
seeing. I need to take a closer look at this eventually.

If you are using password reset functionality, you'll probably want to 
update hash_method to match your password store, i.e. HtPasswordHashMethod 
for .htpasswd store.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: multiple projects transition from a single project

2017-09-27 Thread RjOllos


On Wednesday, September 27, 2017 at 1:13:46 AM UTC-7, Mike Dewhirst wrote:
>
> On 27/09/2017 5:46 PM, Ryan Ollos wrote: 
> > 
> > 
> > On Wed, Sep 27, 2017 at 7:43 AM, Mike Dewhirst  > > wrote: 
> > 
> > On 27/09/2017 5:14 PM, Ryan Ollos wrote: 
> > 
> > What is your [components] section from trac.ini? 
> > 
> > 
> > Just a moment ago I thought I'd tempt fate by uninstalling 
> > TracAccountManager to re-install again. I'm now getting a 500 
> > error[1] when I click Admin -> Plugins 
> > 
> > 
> > Make sure to restart your web server when uninstalling/installing 
> plugins. 
>
> Phew! That fixed the 500 error - thanks. 
>
> > 
> > Regarding the earlier issue, try: 
> > acct_mgr.pwhash.* = enabled 
>
> No progress here. I also swapped htpasswdhashmethod in and 
> htdigesthashmethod out. Made no difference. 
>
> Mike 
>

When editing trac.ini, be sure to remove these two lines:
acct_mgr.pwhash.htdigesthashmethod = disabled 
acct_mgr.pwhash.htpasswdhashmethod = enabled  

Then add:
acct_mgr.pwhash.* = enabled

Set:
[account-manager]
hash_method = HtDigestHashMethod

If that doesn't work, send your [accountmanager] section from trac.ini 
along with your revised [components] section and I'll give it a try.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: "ImportError: No module named trac.web.main" on fresh install with WSGI

2017-09-21 Thread RjOllos


On Monday, September 18, 2017 at 1:49:16 PM UTC-7, Steve Weiss wrote:
>
> I am getting this same error. I'm new to trac and python, the "hello 
> world" test script works fine. When I type "python" and get a prompt, I 
> typed "import trac" and was returned to a prompt. There were no errors, I 
> assume this means it worked? I've been searching around and several people 
> with this problem found that it was a permission issue, but I have no idea 
> on which files or directories. The apache user owns the directory where the 
> trac projects are located (/usr/local/data/trac).
>

Try:
$ sudo -u www-data python
Python 2.7.9 (default, Jun 29 2016, 13:08:31)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import trac

If that fails, you may need to set python-home in WSGIDaemonProcess, or 
using WSGIPythonHome:
http://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIDaemonProcess.html
http://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIPythonHome.html

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Using nginx Basic auth does not allow users to change their password

2017-09-18 Thread RjOllos


On Monday, September 18, 2017 at 2:50:17 AM UTC-6, Mo wrote:
>
> Hi,
>
> doing the auth via Nginx Basic auth, the logins are working fine. But the 
> users doesn't see any way to change its password in the user preferences. I 
> remember that was possible some time ago.
>

That feature is provided by AccountManagerPlugin. You'll need to install 
and configure AccountManager, but you don't have to let AccountManager 
handle the authentication in order to have AccountManager provide password 
change functionality. You can continue to let Nginx handle authentication.
https://trac-hacks.org/wiki/CookBook/AccountManagerPluginConfiguration#HtPasswdStore

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: PanDoc Plugin help

2017-09-18 Thread RjOllos


On Thursday, September 14, 2017 at 3:05:02 AM UTC-6, 
katerinanicolaou1...@gmail.com wrote:
>
> Hi,
>
> Can anyone explain me how to use PanDoc Plugin In Trac? 
> Case: Be able to import a PDF file or Word in Wiki Trac and display it 
> there instead of downloading it.
>
> Thanks in advance,
>

Are you asking how to install the plugin, or how the feature can be 
utilized?

1. Install:
http://trac.edgewall.org/wiki/TracPlugins

2. Using:
Add a docx file to your repository, navigate to the file in the file 
browser and select the file to view it. With the plugin properly installed 
a preview should be rendered.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: After upgrade to TRAC 1.2 all comments gone?

2017-09-18 Thread RjOllos


On Monday, September 18, 2017 at 12:05:44 AM UTC-6, Jos Smit wrote:
>
> Other recipients: 
> Hi Guys, I hope you guys can help me out. After upgrading to Trac 1.2 all 
> the comments are gone? Has anyone experienced this? Regards, Jos 
> Hi Guys,
>
> I hope you guys can help me out. 
>
> After upgrading to Trac 1.2 all the comments are gone? Has anyone 
> experienced this?
>
> Regards,
>
> Jos
>

Upgrading from which Trac version?

1. The ticket preferences has a //Show Comments// toggle, which is sticky 
for each session




2. Make sure to do a hard refresh of the browser to renew cached assets. 
3. Deploy static resources if you are serving them directly from your web 
server: https://trac.edgewall.org/wiki/TracUpgrade#a5.Refreshstaticresources
4. If none of that helps, check the logs and let us know which plugins you 
have installed.
https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheLogs

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Comments from Git's branch can not be inserted into a task list

2017-09-10 Thread RjOllos


On Friday, September 8, 2017 at 2:00:02 AM UTC-7, Mingxing Tian wrote:
>
> I fill in the comments in the format when I submit the change:
>
> see #1695 test commit
>
> If submitted on the trunk, add a comment on the ticket (# 1695).
> But submitted on the branch, the following error occurs.
>
> Trac[web_ui] WARNING: Unable to insert changeset 
> 0837f161e858afba78318dadac512444f1bb013e/testing and ticket 1695 into db: 
> (1062, "Duplicate entry 
> 'testing-0837f161e858afba78318dadac512444f1bb013e-1695' for key 'PRIMARY'"
> )
>
> Why can not the comments submitted from the branch be automatically added 
> to the comment in the order? Is this a bug?
>

Looks like it's reported already:
https://trac-hacks.org/ticket/12966

I did some work on the plugin but I don't really have time to maintain it. 
It could use a maintainer.

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Ticket Status Table

2017-09-10 Thread RjOllos


On Saturday, September 9, 2017 at 12:37:09 PM UTC-7, 
ianstuartjone...@gmail.com wrote:
>
> Hi Michael,
>
> Did you ever manage to figure this out?  I'm essentially looking to build 
> a table with ticket status vs owner and have the table show ticket count.
>
> Thanks,
> Ian
>

You could try writing a report, as previously suggested, and using 
WikiReportMacro.
https://trac-hacks.org/wiki/WikiReportMacro

See TracReports for information on formatting options.
http://trac.edgewall.org/wiki/TracReports

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Import & Display Excel files in wiki pages

2017-09-07 Thread RjOllos


On Thursday, September 7, 2017 at 1:24:52 PM UTC-7, 
katerinanicolaou1...@gmail.com wrote:
>
> Hi,
>
> I would like to know if there is any way to add excel files in TRAC pages. 
> (e.g shedule in XLS) 
> I saw that there is a  ExportImportXlsPlugin but i don't know how to use 
> it.
>

See:
https://trac-hacks.org/tags/excel?wiki=on

ExcelXlstViewerPlugin may meet your needs.

See TracPlugins for information on installing plugins.
https://trac.edgewall.org/wiki/TracPlugins
 

> Also, i wanted to know if there is any way to create page dynamically.
>

Could you clarify this a bit?

- Ryan

 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: AccountManager: erratic behaviour of ResetPwStore

2017-09-05 Thread RjOllos


On Tuesday, September 5, 2017 at 3:09:40 PM UTC-7, Nicolas MARTIN wrote:
>
> From the information we have the hashes must not have the proper prefix.
>
> $ grep -o ':\$[^$]*' ~/auth/trac.passwd | sort | uniq -c
>1428 :$1
>  182 :$6
>  3 :$apr1
>
> '$1' hash passwords are from the previous process with Apache 
> authentication, '$apr1' few testing accounts before we realized with the 
> server administrator that the default hash type 'apr_md5_crypt' will not 
> work to access our SVN repository controlled by a Perl script with crypt() 
> function. Thus we set the hash type to sha512 so '$6' represents new or 
> updated passwords.
>
> I still have a backup of my passwords file just before the switch with all 
> former '$1' hash passwords. Just in case...
>
> $ grep -o ':\$[^$]*' ~/auth/save/trac.passwd.save | sort | uniq -c
>1598 :$1
>
 
I assume you wouldn't see the traceback if you changed your password to 
sha512 and then tried to change it again. That is, the issue is only seen 
when changing from a MD5 to sha512 password.

You could try the following patch:
Index: acct_mgr/pwhash.py
===
--- acct_mgr/pwhash.py(revision 16783)
+++ acct_mgr/pwhash.py(working copy)
@@ -113,6 +113,8 @@

 if hash.startswith('$apr1$'):
 return md5crypt(password, hash[6:].split('$')[0], '$apr1$')
+elif hash.startswith('$1$'):
+return md5crypt(password, hash[3:].split('$')[0])
 elif hash.startswith('{SHA}'):
 return '{SHA}' + 
hashlib.sha1(password).digest().encode('base64')[:-1]
 elif passlib_ctxt is not None and hash.startswith('$5$') and \

- Ryan
 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: AccountManager: erratic behaviour of ResetPwStore

2017-09-05 Thread RjOllos


On Tuesday, September 5, 2017 at 1:45:13 PM UTC-7, RjOllos wrote:
>
> There are multiple problems with password reset. AccountManager hasn't 
> been fully adapted to account for username caching in Trac 1.0.2+.
> https://trac-hacks.org/ticket/11869
> https://trac-hacks.org/ticket/12768
>
> - Ryan
>

Regarding #11869, I'm planning to spend some time on that at the end of 
this month. I think password reset on trac-hacks.org may have some issues, 
and it's been on my todo list for a long time.

If you can't sort out the issue, please keep an eye on #11869, and if 
possible, retest when more changes are committed.

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: AccountManager: erratic behaviour of ResetPwStore

2017-09-05 Thread RjOllos


On Tuesday, September 5, 2017 at 1:29:38 PM UTC-7, Nicolas MARTIN wrote:
>
> What does the following yield on your system?
> >>> from passlib.apps import custom_app_context as passlib_ctxt
> >>> passlib_ctxt.policy.schemes()
> ['sha512_crypt', 'sha256_crypt']
>
> Seems to be a dead-end because passlib was not installed when we initially 
> moved to AccountManager to handle the server authentication.
> Anyway, I have installed passlib-1.7.1 and I got what we could expect:
> $ python
> Python 2.7.6 (default, Mar 18 2014, 22:18:46) 
> [GCC 4.8.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from passlib.apps import custom_app_context as passlib_ctxt
> >>> passlib_ctxt.policy.schemes()
> ['sha512_crypt', 'sha256_crypt']
>

We needed to be sure that the hashing algorithms are available on your 
system:
http://passlib.readthedocs.io/en/stable/lib/passlib.hash.sha256_crypt.html

This class will use the first available of two possible backends:
>
> stdlib crypt(), if the host OS supports SHA256-Crypt (most Linux 
> systems).
> a pure python implementation of SHA256-Crypt built into Passlib
>

Take a look at the code and there are only about 3 conditions that would 
lead to not taking the desired branch:
https://trac-hacks.org/browser/accountmanagerplugin/trunk/acct_mgr/pwhash.py?version=16370=118-122#L106

>From the information we have the hashes must not have the proper prefix.
 

> For my part, I was able to reset my user password from the administration 
> interface without problem.
> Also I realized that the login module crashes in all cases (void, wrong or 
> temporary password from email) except of course the good one from the hash 
> passwords file.
>
> Nicolas
>

There are multiple problems with password reset. AccountManager hasn't been 
fully adapted to account for username caching in Trac 1.0.2+.
https://trac-hacks.org/ticket/11869
https://trac-hacks.org/ticket/12768

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: AccountManager: erratic behaviour of ResetPwStore

2017-09-05 Thread RjOllos


On Tuesday, September 5, 2017 at 5:40:01 AM UTC-7, Nicolas MARTIN wrote:
>
> Hello Trac users, 
>
>
> Few months ago, we moved in our project from HTTP to HTML authentication 
> with AccountManager. No particular issue since then except a warning in 
> the log "Trac[web_ui] WARNING: ResetPwStore is disabled, therefore 
> password reset won't work." but with no evident effect ('ResetPwStore' 
> was still enabled under 'Plugins' and the password reset procedure was 
> working). 
>
> But recently several users got the following error at the login page 
> with the temporary password received by email, when they tried to set 
> their own password after the account creation: 
>
> Traceback (most recent call last): 
>File "/usr/lib/python2.7/site-packages/trac/web/api.py", line 514, in 
> send_error 
>  data, 'text/html') 
>File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 968, 
> in render_template 
>  message = Markup(req.session.pop('chrome.%s.%d' 
>File "/usr/lib/python2.7/site-packages/trac/web/api.py", line 316, in 
> __getattr__ 
>  value = self.callbacks[name](self) 
>File "/usr/lib/python2.7/site-packages/trac/web/main.py", line 268, in 
> _get_session 
>  return Session(self.env, req) 
>File "/usr/lib/python2.7/site-packages/trac/web/session.py", line 200, 
> in __init__ 
>  if req.authname == 'anonymous': 
>File "/usr/lib/python2.7/site-packages/trac/web/api.py", line 316, in 
> __getattr__ 
>  value = self.callbacks[name](self) 
>File "/usr/lib/python2.7/site-packages/trac/web/main.py", line 135, in 
> authenticate 
>  authname = authenticator.authenticate(req) 
>File "build/bdist.linux-x86_64/egg/acct_mgr/util.py", line 81, in wrap 
>  return func(self, *args, **kwds) 
>File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 451, in 
> authenticate 
>  username = self._remote_user(req) 
>File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 766, in 
> _remote_user 
>  if acctmgr.check_password(username, password) is True: 
>File "build/bdist.linux-x86_64/egg/acct_mgr/api.py", line 287, in 
> check_password 
>  valid = store.check_password(user, password) 
>File "build/bdist.linux-x86_64/egg/acct_mgr/htfile.py", line 69, in 
> check_password 
>  return self._check_userline(user, password, line) 
>File "build/bdist.linux-x86_64/egg/acct_mgr/htfile.py", line 207, in 
> _check_userline 
>  return suffix == htpasswd(password, suffix) 
>File "build/bdist.linux-x86_64/egg/acct_mgr/pwhash.py", line 140, in 
> htpasswd 
>  available.""")) 
> NotImplementedError: Neither are "sha2" hash algorithms supported by the 
>  "crypt" module on this platform nor is "passlib" 
>  available. 
>
> The tricky thing is that at the same time other users did not encounter 
> this issue and were able to complete the procedure, I received few email 
> notifications of password reset since the first feedback of the problem. 
>
> This occurred during my vacations and at first glance I does not have to 
> blame my colleagues of a change in the plugin configuration. 
> Regarding the plugin version, we use the very last revision of the trunk 
> branch (r16720) on our Trac 1.0.1 installation. 
>
> Here is an extract of trac.ini 
>
> [account-manager] 
> htpasswd_file = ../auth/trac.passwd 
> htpasswd_hash_type = sha512 
> login_attempt_max_count = 3 
> notify_actions = new,change,delete 
> password_store = HtPasswdStore 
> refresh_passwd = true 
> user_lock_time = 3600 
> username_regexp = (?i)^[a-z0-9]{5,}$ 
>
> ... 
>
> [components] 
> acct_mgr.admin.useradminpanel = disabled 
> acct_mgr.db.sessionstore = disabled 
> acct_mgr.htfile.htdigeststore = disabled 
> acct_mgr.http.* = disabled 
> acct_mgr.register.* = disabled 
> acct_mgr.svnserve.svnservepasswordstore = disabled 
> trac.web.auth.loginmodule = disabled 
> tracopt.ticket.commit_updater.* = enabled 
> tracopt.ticket.deleter.ticketdeleter = disabled 
> tracopt.versioncontrol.svn.svn_fs.subversionconnector = enabled 
> xmail.xmailmainview.xmailmainview = enabled 
> xmail.xmailpermissions.xmailpermission = enabled 
>
>
> I was able to reproduce the bug by myself with my personal account, then 
> I installed passlib module and finally add 'ResetPwStore' to 
> 'password_store' option (remove the warning in the Trac log) but the 
> issue remains... 
>
>
>
> Regards, 
> Nicolas 
>

Try adding:
[account-manager] 
hash_method = HtPasswdHashMethod

What Linux distro are you running?

What does the following yield on your system?
>>> from passlib.apps import custom_app_context as passlib_ctxt
>>> passlib_ctxt.policy.schemes()
['sha512_crypt', 'sha256_crypt']

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this 

Re: [Trac] Detect different sources of changes with INotificationSubscriber?

2017-09-04 Thread RjOllos


On Tuesday, August 29, 2017 at 9:58:10 AM UTC-7, Peter Suter wrote:
>
> On 29.08.2017 15:34, Tim Ward wrote:
>
> I'm playing with a INotificationSubscriber plugin to generate 
> notifications (I'll have quite a complex system to decide which 
> notifications go to which people depending an all sorts of things about the 
> content of the ticket). 
>
> One thing I want to do is be able to tell the difference between when a 
> change (typically an added comment) comes in through the XMLRPC interface 
> and when it's something the user has done in the browser.
>
>
> I'm not familiar with XMLRPC. Is there in general a way to detect XMLRPC?
>

I'd be interested to know. If I was trying to determine, I'd look at the 
request headers, and maybe the req.path_info or 
req.get_header('Content-Type') will indicate.

In 1.1.6 we added req.is_xhr:
https://trac.edgewall.org/browser/tags/trac-1.2/trac/web/api.py#L506

I'd be interested to see what xmlrpclib sets the "X-Requested-With" header 
to.

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Random "Target WSGI script cannot be loaded as Python module" after Python upgrade

2017-09-04 Thread RjOllos


On Thursday, August 31, 2017 at 10:32:39 AM UTC-7, Matt wrote:
>
> I do not use virtualenvs, and I saw that post you linked, not the same 
> situation. He is showing an old python version with a new hmac file. I am 
> showing a new python version with a new hmac file and it is only 
> randomly(1/50) not finding the dependency.
>

I would:
1. Upgrade Trac to 1.2.2. Make sure to read TracUpgrade.
http://trac.edgewall.org/wiki/TracUpgrade
2. Review your Apache configuration against the recommendations on the 
TracModWSGI page.
https://trac.edgewall.org/wiki/TracModWSGI

- Ryan

 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Local backup of a Trac server running in the cloud

2017-09-04 Thread RjOllos


On Friday, September 1, 2017 at 4:49:44 PM UTC-7, James Lampert wrote:
>
> What I finally ended up with was a shell script, running on the local 
> machine to which we are backing up:
> 1. Use ssh with a remote command to hotcopy the trac project to the home 
> directory on the cloud box.
> 2. Use rsync to synchronize the cloud box's hotcopy with a copy in the 
> local box's home directory.
> 3. Delete the hotcopy on the cloud.
> 4. copy the local home directory copy to the external drive being used for 
> automatic backups.
>

Looks like a good pattern to follow.

If you happen to know, I'd be interested what the typical data transfer 
size is when rsync'ing after making a few changes to the database.

- Ryan
 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: wiki page as pdf

2017-09-04 Thread RjOllos


On Tuesday, August 29, 2017 at 11:07:45 PM UTC-7, Roger Oberholtzer wrote:
>
> On Tue, Aug 29, 2017 at 10:28 PM, RjOllos <rjol...@gmail.com> wrote: 
>
> > You might need to set the [wikitopdf] htmldoc_path option if htmldoc is 
> not 
> > on the system path. 
> > 
> > I haven't needed to set it in testing the plugin, however: 
> > $which htmldoc 
> > /usr/local/bin/htmldoc 
>
> A missing htmldoc was the problem. When that was corrected, the 
> generated file contained content. Thanks! 
>
> I'm surprised that there was no complaint in the log. 
>

Errors from os.system go to stderr and are not logged. We should probably 
be using the subprocess module. I'll look at fixing it.
https://trac-hacks.org/ticket/13266 

Next question: is it possible for the document to contain the images 
> in the page? 
>

Looks like there might be some defects with including images. Keep an eye 
on this ticket and I'll try to get to it soon:
https://trac-hacks.org/ticket/10103

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Newlines in comments?

2017-08-30 Thread RjOllos


On Wednesday, August 30, 2017 at 1:09:53 AM UTC-7, Tim Ward wrote:
>
> data = '{{ "params": [ {}, "{}", {{ "action": "leave" }}, true ], 
> "method": "ticket.update" }}'
>
> r = requests.post( url, data=data.format( ticketId, comment ), 
> headers=headers, auth=auth )
>
> (Python) - how do I usefully include a line break in the content of the 
> comment string variable?
>

Your code snippet uses Requests, but your earlier comment discussed using 
XmlRpcPlugin. If you want to send rpc requests you should use xmlrpclib:
https://trac-hacks.org/rpc#XML-RPC
https://trac-hacks.org/wiki/XmlRpcPlugin#PythonEnd-UserUsage

... or did I misread your intention?

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: wiki page as pdf

2017-08-29 Thread RjOllos


On Monday, August 28, 2017 at 7:29:29 AM UTC-7, Roger Oberholtzer wrote:
>
> On Mon, Aug 28, 2017 at 4:22 PM, RjOllos <rjol...@gmail.com> wrote: 
>
> > Export to PDF is not a feature provided by Trac. Which plugin are you 
> using? 
>
> TracWikiToPdfPlugin 3.0.0.dev0 with all options enabled. 
>
> There is also an admin page where I can select various pages to put in 
> a single PDF. But I do not think that is used when exporting a 
> specific page from the link at the bottom of the page. If I select the 
> same page there, I also get an empty PDF doc. 
>
> > Do you get an empty PDF on every page you try to export, or only with 
> one of 
> > the pages in your system? 
>
> All pages seem to be empty. 
>

You might need to set the [wikitopdf] htmldoc_path option if htmldoc is not 
on the system path.

I haven't needed to set it in testing the plugin, however:
$which htmldoc
/usr/local/bin/htmldoc

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: wiki page as pdf

2017-08-28 Thread RjOllos


On Monday, August 28, 2017 at 12:34:30 AM UTC-7, Roger Oberholtzer wrote:
>
> I am running Trac 1.2.2 on Linux. I have a rather simple wiki page 
> that I want to export as PDF. When I click at the bottom of the wiki 
> page to download as PDF, I get an empty PDF file. If I download as 
> Text, I get the expected text in the text file. 
>
> I do not see any complaint in the Trac log. Any idea why the PDF 
> document would be made, but be empty? 
>

Export to PDF is not a feature provided by Trac. Which plugin are you using?

Do you get an empty PDF on every page you try to export, or only with one 
of the pages in your system?

- Ryan 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: Introduce the warehouse synchronization documents need to be updated

2017-08-26 Thread RjOllos


On Friday, August 11, 2017 at 12:20:54 AM UTC-7, RjOllos wrote:
>
>
> On Thu, Aug 10, 2017 at 7:11 PM, Mingxing Tian <mx.t...@qq.com> wrote:
>
>>
>>
>> 在 2017年8月10日星期四 UTC+8下午5:50:22,RjOllos写道:
>>>
>>>
>>>
>>> On Thu, Aug 10, 2017 at 2:48 AM, Mingxing Tian <mx@qq.com> wrote:
>>>
>>>> I try to create the file "post-receive" and enter the contents of the 
>>>> given, of course, modify the value of the above two lines of variables. 
>>>> But 
>>>> the result is a failure, this way is not correct. 
>>>>
>>>
>>> We need to know the exact steps you took and the error messages you 
>>> received in order to help you determine what you did incorrectly.
>>>
>>> - Ryan 
>>>
>>
>> My steps:
>>  
>> [root@host105 svnconf]# cd /home/git/repositories/testing.git/hooks/
>> [root@host105 hooks]# touch post-receive
>> [root@host105 hooks]# vim post-receive
>> [root@host105 hooks]# cat post-receive
>> #!/bin/sh
>> tracenv=/home/projects/xxx # change with your Trac environment's path
>> repos=testing   # change with your repository's name
>> while read oldrev newrev refname; do
>> if [ "$oldrev" =  ]; then
>> git rev-list --reverse "$newrev" --
>> else
>> git rev-list --reverse "$newrev" "^$oldrev" --
>> fi | xargs trac-admin "$tracenv" changeset added "$repos"
>> done
>> [root@host105 hooks]#
>>
>>
>>
> It seems your hook may not be executable.
> https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
>
> "To enable a hook script, put a file in the hooks subdirectory of your 
> .git directory that is named appropriately (without any extension) and is 
> executable."
>
> - Ryan
>

Also, you may want to try using the full path to trac-admin.

Added additional details to document:
https://trac.edgewall.org/wiki/1.3/TracRepositoryAdmin#Git

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


<    2   3   4   5   6   7   8   9   10   11   >