Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13694 closed defect (fixed)

Exception caught while checking for upgrade:

Reported by: duytscal Owned by: Ryan J Ollos
Priority: normal Component: DefaultCcPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.4

Description (last modified by duytscal)

2019-11-26 15:05:25,822 Trac[env] ERROR: Exception caught while checking for upgrade: TracError: Unable to check for upgrade of defaultcc.admin.DefaultCCAdmin: TypeError: environment_needs_upgrade() takes exactly 2 arguments (1 given)

(TracDefaultCc 0.5.dev0)

(my ref: https://trac.onroerenderfgoed.be/toepassingen/ticket/2704)

Attachments (0)

Change History (17)

comment:1 Changed 4 years ago by Ryan J Ollos

Status: newaccepted

comment:2 Changed 4 years ago by Ryan J Ollos

The appending of the "Default CC" column on the Manage Components page needs to be implemented in JavaScript. Because of the conversion to Jinja2, the Genshi template modifications will no longer function.

comment:3 Changed 4 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 17598:

TracDefaultCc 0.5dev: Make compatible with Trac 1.4

Port template modifications from ITemplateStreamFilter
to JavaScript.

Fixes #13694.

comment:4 Changed 4 years ago by Ryan J Ollos

Please confirm if it's working for you and I'll publish the new version to PyPI.

Last edited 4 years ago by Ryan J Ollos (previous) (diff)

comment:5 Changed 4 years ago by duytscal

Description: modified (diff)

comment:6 Changed 4 years ago by duytscal

Description: modified (diff)

comment:7 Changed 4 years ago by duytscal

r17598 seems to work fine!

thank you for the swift reaction!

Last edited 4 years ago by Ryan J Ollos (previous) (diff)

comment:8 Changed 4 years ago by Ryan J Ollos

In 17604:

TracDefaultCc 0.5: Release version 0.5

Published to pypi:TracDefaultCc.

Refs #13694.

comment:9 Changed 4 years ago by Ryan J Ollos

In 17605:

TracDefaultCc 0.6dev: Bump version and fix description

Refs #13694.

comment:10 Changed 4 years ago by anonymous

  1. could it be that the SVN tag 0.6 has not been published yet?
  1. also, it looks like there is a login problem when enabling this plugin.

I'm trying to reproduce the problem (logout-login-error) but the logs don't give much useful info.

I'm still using the revision prior the tag text 0.6, assuming there is no change any more.

after Trac restart I see that the plugin loads normnally:

==> /var/projects/trac/trac_logs/gis.log <==
2019-12-03 10:50:47,824 Trac[main] DEBUG: Dispatching <RequestWithSession "POST '/admin/general/plugin'">
2019-12-03 10:50:47,824 Trac[main] DEBUG: Chosen handler is <Component trac.admin.web_ui.AdminModule>
2019-12-03 10:50:47,826 Trac[session] DEBUG: Retrieving session for ID u'duytscal'
2019-12-03 10:50:47,830 Trac[perm] DEBUG: DefaultPermissionPolicy allows duytscal performing TRAC_ADMIN on <Resource u'admin:general/basics'>
2019-12-03 10:50:47,833 Trac[main] DEBUG: Negotiated locale: None -> en_US
2019-12-03 10:50:47,834 Trac[perm] DEBUG: DefaultPermissionPolicy allows duytscal performing TRAC_ADMIN on <Resource u'admin:general/logging'>
2019-12-03 10:50:47,834 Trac[perm] DEBUG: DefaultPermissionPolicy allows duytscal performing PERMISSION_GRANT on <Resource u'admin:general/perm'>
2019-12-03 10:50:47,834 Trac[perm] DEBUG: DefaultPermissionPolicy allows duytscal performing TRAC_ADMIN on <Resource u'admin:general/plugin'>
2019-12-03 10:50:47,835 Trac[perm] DEBUG: DefaultPermissionPolicy allows duytscal performing TICKET_ADMIN on <Resource u'admin:ticket/components'>
2019-12-03 10:50:47,835 Trac[perm] DEBUG: DefaultPermissionPolicy allows duytscal performing MILESTONE_ADMIN on <Resource u'admin:ticket/milestones'>
2019-12-03 10:50:47,835 Trac[perm] DEBUG: DefaultPermissionPolicy allows duytscal performing TICKET_ADMIN on <Resource u'admin:ticket/versions'>
2019-12-03 10:50:47,835 Trac[perm] DEBUG: DefaultPermissionPolicy allows duytscal performing TICKET_ADMIN on <Resource u'admin:ticket/priority'>
2019-12-03 10:50:47,835 Trac[perm] DEBUG: DefaultPermissionPolicy allows duytscal performing TICKET_ADMIN on <Resource u'admin:ticket/resolution'>
2019-12-03 10:50:47,835 Trac[perm] DEBUG: DefaultPermissionPolicy allows duytscal performing TICKET_ADMIN on <Resource u'admin:ticket/severity'>
2019-12-03 10:50:47,835 Trac[perm] DEBUG: DefaultPermissionPolicy allows duytscal performing TICKET_ADMIN on <Resource u'admin:ticket/type'>
2019-12-03 10:50:47,835 Trac[web_ui] INFO: Enabling component defaultcc.admin.DefaultCCAdmin
2019-12-03 10:50:47,836 Trac[web_ui] INFO: Enabling component defaultcc.main.TicketDefaultCC
2019-12-03 10:50:47,847 Trac[chrome] DEBUG: Prepare chrome data for request

==> /var/log/trac/nginx_access.log <==
10.42.0.9 - - [03/Dec/2019:10:50:47 +0100] "POST /gis/admin/general/plugin HTTP/1.1" 303 0 "https:/serxxx/gis/admin/general/plugin" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0"



==> /var/projects/trac/trac_logs/gis.log <==
2019-12-03 10:50:47,909 Trac[env] INFO: Reloading environment due to configuration change
2019-12-03 10:50:47,917 Trac[env] INFO: -------------------------------- environment startup [Trac 1.4] --------------------------------
2019-12-03 10:50:47,940 Trac[loader] DEBUG: Loading plugin "cc_selector.cc_selector" from "/opt/data/trac/trac_eggs/cc_selector-0.1.0.dev0-py2.7.egg"
2019-12-03 10:50:47,941 Trac[loader] DEBUG: Loading plugin "defaultcc.admin" from "/opt/data/trac/trac_eggs/TracDefaultCc-0.5.dev0-py2.7.egg"
2019-12-03 10:50:47,941 Trac[loader] DEBUG: Loading plugin "defaultcc.main" from "/opt/data/trac/trac_eggs/TracDefaultCc-0.5.dev0-py2.7.egg"

after logout:

==> /var/log/trac/nginx_access.log <==
10.42.0.9 - - [03/Dec/2019:10:54:49 +0100] "GET /gis/logout HTTP/1.1" 302 0 "https://test-trac.onroerenderfgoed.be/gis/admin/general/plugin" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Fi
refox/70.0"


  • trac.ini: set to log_level = DEBUG
  • after a logout/login I get a "page isn't redirecting properly" which might indicate a 500 in the server. but I don't see any special error in the logs

when I disable the defaultcc lines

[components]
#defaultcc.admin.defaultccadmin = enabled
#defaultcc.main.ticketdefaultcc = enabled

I can login again.

comment:11 Changed 4 years ago by duytscal

  • previous comment:10 was mine; odd that "anonymous" can make a change.
  • not sure if the plugin is the cause of login problem

comment:12 in reply to:  10 Changed 4 years ago by Ryan J Ollos

Replying to anonymous:

  1. could it be that the SVN tag 0.6 has not been published yet?

0.6dev is the next development version. There are no changes in version 0.6dev yet. Version 0.5 has been published: pypi:TracDefaultCc/0.5 and defaultccplugin/tags/0.5.

comment:13 in reply to:  11 Changed 4 years ago by Ryan J Ollos

Replying to duytscal:

  • previous comment:10 was mine; odd that "anonymous" can make a change.

That is as intended. We've always kept trac-hacks.org open to anonymous comments, which are filtered by spam filter and reviewed by the admins.

comment:14 in reply to:  11 Changed 4 years ago by Ryan J Ollos

Replying to duytscal:

  • not sure if the plugin is the cause of login problem

Did you find some additional evidence? I don't see how the plugin could be causing a login problem, but happy to investigate further if you have some clues.

I suggest deleting /opt/data/trac/trac_eggs/TracDefaultCc-0.5.dev0-py2.7.egg and installing the version published to pypi:TracDefaultCc or defaultccplugin/tags/0.5.

comment:15 Changed 4 years ago by duytscal

Same problem for tags/0.5.

==> /var/log/trac/nginx_access.log <==
10.42.0.9 - - [06/Jan/2020:11:47:23 +0100] "GET /gis/ HTTP/1.1" 302 0 "https://oefen.milieuinfo.be/sso/Consumer/metaAlias/sp/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0"

==> /var/projects/trac/trac_logs/gis.log <==
2020-01-06 11:47:23,385 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/login?referer=https%3A%2F%2Ftest-trac.onroerenderfgoed.be%2Fgis%2F'">
2020-01-06 11:47:23,385 Trac[main] DEBUG: Chosen handler is <Component trac_oauth.trac_oauth.OAuthPlugin>
2020-01-06 11:47:23,387 Trac[session] DEBUG: Retrieving session for ID 'c181871cc4b5b983b1ed2ec0'
2020-01-06 11:47:23,387 Trac[perm] DEBUG: No policy allowed anonymous performing TICKET_ADMIN on None

parts of trac.ini:

[components]
defaultcc.admin.defaultccadmin = enabled
defaultcc.main.ticketdefaultcc = enabled

[project]
descr = Trac in verband met GIS
name = GIS (TEST)
url = https://test-trac.onroerenderfgoed.be/gis

[trac]
auth_cookie_domain = 
auth_cookie_lifetime = 0
auth_cookie_path = 
base_url = https://test-trac.onroerenderfgoed.be/gis
permission_policies = DefaultWikiPolicy,DefaultTicketPolicy,DefaultPermissionPolicy,LegacyAttachmentPolicy
permission_store = DefaultPermissionStore
secure_cookies = disabled
use_base_url_for_redirect = disabled

[ticket]
#default_cc = vvinckmo, troncqko, biermadi


==> /var/log/trac/nginx_access.log <==
10.42.0.9 - - [06/Jan/2020:11:51:36 +0100] "GET /gis/login?referer=https%3A%2F%2Ftest-trac.onroerenderfgoed.be%2Fgis%2F HTTP/1.1" 302 0 "https://oefen.milieuinfo.be/sso/Consumer/metaAlias/sp/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0"

no problem when I disable [components] defaultcc.* (at one point I thought it made a difference when enabling the plugin via the web interface.)

comment:16 Changed 4 years ago by Ryan J Ollos

TracDefaultCc is the only plugin you have installed? TracDefaultCc doesn't do any redirects, and shouldn't even alter the request handling except for the path /admin/ticket/components. I'm puzzled.

I'll push a minor change, which I don't think will make a difference, but worth testing on your end.

Might [trac] use_base_url_for_redirect be needed for your Nginx configuration? I don't know much about Nginx.

comment:17 Changed 4 years ago by Ryan J Ollos

In 17658:

TracDefaultCc 0.6dev: Test path before permissions check

Refs #13694.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.