Thanks Ryan,I did all the checks on the troubleshooting page and everything went fine except for one thing:the ticketmoverplugin has two dependencies: ticketsidebarproviderplugin and TracSqlHelperScript.ticketmoverplugin and ticketsidebarproviderplugin are showing in my admin GUI page as plugins - TracSqlHelperScript is NOT!? I treated TracSqlHelperScript as a plugin and put the egg in the plugins directory - it this the problem I have? Does 'script' make it different from 'plugin'?Thanks again,Ahmed
I tried it with no luck, sorry. I wish I know enough to help with the debugging. here is the GUI view of what I have. I assume that there isn't anything else I need to do to make it work. I have three 'projects' in the same c:\trac folder - I did the troubleshooting steps you provided. Any debugging advice you can give me?
Thanks Ryan,I 'll try to find out what's going on and I will let you know if I find anything.I checked the logs and the only message I get when I restart the environment is:2015-12-10 22:31:14,677 Trac[api] WARNING: Unable to find repository '(default)' for synchronizationDo you think that has anything to do with the issue in hand?
I tried it with no luck, sorry. I wish I know enough to help with the debugging. here is the GUI view of what I have. I assume that there isn't anything else I need to do to make it work. I have three 'projects' in the same c:\trac folder - I did the troubleshooting steps you provided. Any debugging advice you can give me?
Still no luck.The ticketsidebarprovider plugin comes with a 'hello world' test and that works; I can see the Hello World sidebar. As for the ticketmover plugin, still nothing.Is there anything I can do to debug this? may be if you can give me a few things to test\check I can do that and send them over to you.
By the way, the trac projects I have are located in C:\trac\swtrac, C:\trac\hwtrac and C:\trac\chtrac. How do one of those know about the other? I guess my question is about how the plugin really works to move one ticket to another database.
On Mon, Dec 14, 2015 at 11:52 AM, Ahmed M. <sab...@gmail.com> wrote:Still no luck.The ticketsidebarprovider plugin comes with a 'hello world' test and that works; I can see the Hello World sidebar. As for the ticketmover plugin, still nothing.Is there anything I can do to debug this? may be if you can give me a few things to test\check I can do that and send them over to you.If there's a problem with the plugin we'll almost certainly see an error in the logs. Otherwise, it's probably an installation issue.
By the way, the trac projects I have are located in C:\trac\swtrac, C:\trac\hwtrac and C:\trac\chtrac. How do one of those know about the other? I guess my question is about how the plugin really works to move one ticket to another database.The plugin knows about all of the Trac projects because they have the same parent directory:You can see from the code that trac.env_paths or trac.env_parent_dir needs to be set in the environment. This depends on Apache and the cgi or fcgi script being correctly configured. If you are using the cgi or fcgi script created by TracAdmin deploy you shouldn't need to worry about it.Are you using mod_python or mod_wsgi? If using mod_wsgi, have you set TRAC_ENV_PARENT_DIR?
If using mod_python, have you set TracEnvParentDir?Also, please make sure to post below the text you are replying to so that it's completely unambiguous which comments are replying to. Thanks!
- Ryan
please seen my comments below.
On Monday, December 14, 2015 at 3:12:01 PM UTC-5, RjOllos wrote:On Mon, Dec 14, 2015 at 11:52 AM, Ahmed M. <sab...@gmail.com> wrote:Still no luck.The ticketsidebarprovider plugin comes with a 'hello world' test and that works; I can see the Hello World sidebar. As for the ticketmover plugin, still nothing.Is there anything I can do to debug this? may be if you can give me a few things to test\check I can do that and send them over to you.If there's a problem with the plugin we'll almost certainly see an error in the logs. Otherwise, it's probably an installation issue.By the way, the trac projects I have are located in C:\trac\swtrac, C:\trac\hwtrac and C:\trac\chtrac. How do one of those know about the other? I guess my question is about how the plugin really works to move one ticket to another database.The plugin knows about all of the Trac projects because they have the same parent directory:You can see from the code that trac.env_paths or trac.env_parent_dir needs to be set in the environment. This depends on Apache and the cgi or fcgi script being correctly configured. If you are using the cgi or fcgi script created by TracAdmin deploy you shouldn't need to worry about it.Are you using mod_python or mod_wsgi? If using mod_wsgi, have you set TRAC_ENV_PARENT_DIR?Thanks, that's what I was missing. I didn't set up the trac environment variable in my wsgi file becasue i was using the one that is generated during the deploy operation.
I simplified the wsgi file to:{{{import syssys.stdout = sys.stderrimport osos.environ['TRAC_ENV_PARENT_DIR'] = 'C:\\trac'os.environ['PYTHON_EGG_CACHE'] = 'C:\\trac\\egg_cache'import trac.web.mainapplication = trac.web.main.dispatch_request}}}Now the ticket mover works BUT I see an error after I login (see attached).My Apache config has this for each of my trac projects:{{{# point to where the wsgi script isWSGIScriptAlias /swtrac C:/trac/swtrac/cgi-bin/trac.wsgi# Tell Apache that this is an ok directory to use ...<Directory C:/trac/swtrac/cgi-bin>WSGIApplicationGroup %{GLOBAL}<IfModule mod_authz_core.c>Require all granted</IfModule></Directory>}}}
After some investigation, I found that the issue was that in my Apache config, it seemed to me that it didn't know where to go after accepting a login request. It was looking for /login page which doesn't exist. I created one wsgi script for all sites and updated my Apache config with this:{{{# point to where the wsgi script isWSGIScriptAlias /trac C:/trac_stuff/wsgi/trac.wsgi# Tell Apache that this is an ok directory to use ...<Directory C:/trac_stuff/wsgi>WSGIApplicationGroup %{GLOBAL}<IfModule mod_authz_core.c>Require all granted</IfModule></Directory>}}}It works just fine now - THANK YOU SO MUCH. I hope others can benefit from this.I am now working on customizing it - I want to remove the deletion checkbox - deletion is not allowed. Any help is appreciated.
On Tue, Dec 15, 2015 at 8:31 AM, Ahmed M. <sab...@gmail.com> wrote:After some investigation, I found that the issue was that in my Apache config, it seemed to me that it didn't know where to go after accepting a login request. It was looking for /login page which doesn't exist. I created one wsgi script for all sites and updated my Apache config with this:{{{# point to where the wsgi script isWSGIScriptAlias /trac C:/trac_stuff/wsgi/trac.wsgi# Tell Apache that this is an ok directory to use ...<Directory C:/trac_stuff/wsgi>WSGIApplicationGroup %{GLOBAL}<IfModule mod_authz_core.c>Require all granted</IfModule></Directory>}}}It works just fine now - THANK YOU SO MUCH. I hope others can benefit from this.I am now working on customizing it - I want to remove the deletion checkbox - deletion is not allowed. Any help is appreciated.It should be easy enough to just remove the checkbox from the template.
If you want to propose a patch for the plugin, one possibility would be to have separate options for the ticket move permission and the ticket delete permission.- Ryan
I would actually love to do that. I am quite new to python\trac programming but I will give it a shot. I have other ideas that I would like to implement as well. Is there a resource I can go to to get a crash course on trac plugin programming?
One thing I could use some help on is customizing the box that has the ticket mover button and combo box. ticketmover-sidebar.html doesn't have any references to a css style sheet. there is a style sheet in "C:\trac\hwtrac\htdocs\common\css\ticket-sidebar.css" but changing that doesn't make any difference. Any thoughts on that?Ahmed
On Tue, Dec 15, 2015 at 3:16 PM, Ahmed M. <sab...@gmail.com> wrote:One thing I could use some help on is customizing the box that has the ticket mover button and combo box. ticketmover-sidebar.html doesn't have any references to a css style sheet. there is a style sheet in "C:\trac\hwtrac\htdocs\common\css\ticket-sidebar.css" but changing that doesn't make any difference. Any thoughts on that?AhmedThe outer div has class "sidebar", so you could add rules to a custom stylesheet.
If needed, you could add classes to the ticket mover sidebar elements and submit a patch:
- Ryan
On Tuesday, December 15, 2015 at 6:29:42 PM UTC-5, RjOllos wrote:On Tue, Dec 15, 2015 at 3:16 PM, Ahmed M. <sab...@gmail.com> wrote:One thing I could use some help on is customizing the box that has the ticket mover button and combo box. ticketmover-sidebar.html doesn't have any references to a css style sheet. there is a style sheet in "C:\trac\hwtrac\htdocs\common\css\ticket-sidebar.css" but changing that doesn't make any difference. Any thoughts on that?AhmedThe outer div has class "sidebar", so you could add rules to a custom stylesheet.I tried that but didn't have any luck. I still need to do some reading on that. I tried adding the css style inline with the html code in the template and it worked just fine
I have one question though, how do I prevent the drop-down menu from showing the current project? I tried to move a ticket to the same project and it worked - is there a way I can remove the current project from the list?
Here is something I tried and I can't find an explanation for. I downloaded [15128] in stead of [15109] and it worked!
I am going to do a diff and see what are the differences. I just thought I 'd update you.Also, I added the 'os.path.normpath' to{{{if env_path != os.path.normpath(self.env.path):}}}but it didn't help.Any suggestions where to look?
On Monday, December 21, 2015 at 5:56:19 PM UTC-8, Ahmed M. wrote:Here is something I tried and I can't find an explanation for. I downloaded [15128] in stead of [15109] and it worked!That's strange, there should be no difference in behavior between those two versions.
I am going to do a diff and see what are the differences. I just thought I 'd update you.Also, I added the 'os.path.normpath' to{{{if env_path != os.path.normpath(self.env.path):}}}but it didn't help.Any suggestions where to look?You could log the env_path values to see if we can spot an issue:self.log.debug("TicketMoverPlugin: env_path = %s, self.env.path = %s", env_path, self.env.path)