Mailing List Archive

Trac 1.4.2 - doesn't handle spaces in Milestone names?
I've just managed to upgrade a long-running Trac instance from a very old
version of Trac (0.12 IIRC) to 1.4.2 and it's mostly gone well.

However, in our Issue Tracker, all our Milestone names have spaces in them
and this is causing problems.

On our Roadmap page, links to milestones include url-encoded spaces, but
these cause broken links. For example, clicking on our "Release Edition
5.3" takes me to a New Milestone page with the following message at the top:
Milestone Release%20Edition%205.3 does not exist. You can create it here.

Is there something I have missed in the configuration or does Trac no
longer permit spaces in Milestone names?

TIA,

Rob Hills
Waikiki, Western Australia

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/cb87c33d-152f-4679-bf8a-d6e82da97b95n%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
On Wednesday, December 23, 2020 at 12:18:11 PM UTC-8 rcp....@gmail.com
wrote:

>
> I've just managed to upgrade a long-running Trac instance from a very old
> version of Trac (0.12 IIRC) to 1.4.2 and it's mostly gone well.
>
> However, in our Issue Tracker, all our Milestone names have spaces in them
> and this is causing problems.
>
> On our Roadmap page, links to milestones include url-encoded spaces, but
> these cause broken links. For example, clicking on our "Release Edition
> 5.3" takes me to a New Milestone page with the following message at the top:
> Milestone Release%20Edition%205.3 does not exist. You can create it here.
>
> Is there something I have missed in the configuration or does Trac no
> longer permit spaces in Milestone names?
>
> TIA,
>
> Rob Hills
> Waikiki, Western Australia
>

This shouldn't be happening with Trac 1.4.2. There was no change in the
allowed characters for milestones. I tested with Trac standalone and the
HTML on the page is:

<a href="/proj-1.3/milestone/With%20whitespace">
Milestone: <em>With whitespace</em></a>

The URL encoding in the error message might be a hint as to the problem. I
think someone else may have raised this issue on the forum, but I can't
locate it right now.

My best guess would be a plugin or webserver configuration causing the
problem. Do you have any plugins installed such as SimpleMultiProject?

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/93857849-714e-43b8-b383-afa8dbc0e8cbn%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
Hi Ryan, thanks for your reply.

I've since established that the problem is not just with Milestones.
Versions and Components, two other areas where we have spaces in names
suffer the same problem.

Re plugins, I carried over the ones from our old installation that were
supposedly compatible with 1.4. I have:

- TracAccountManager 0.6.dev0
- TracTags 0.11
- TracThemeEngine 2.2.4
- TracXMLRPC 1.1.9
- TracCrystalXTheme 1.1 (installed but not active as it is broken in
Trac 1.4.2)

Maybe I should completely uninstall the theme-related ones since they're
not in use currently anyway?
On Thursday, 24 December 2020 at 05:22:34 UTC+8 RjOllos wrote:

> On Wednesday, December 23, 2020 at 12:18:11 PM UTC-8 rcp....@gmail.com
> wrote:
>
>>
>> I've just managed to upgrade a long-running Trac instance from a very old
>> version of Trac (0.12 IIRC) to 1.4.2 and it's mostly gone well.
>>
>> However, in our Issue Tracker, all our Milestone names have spaces in
>> them and this is causing problems.
>>
>> On our Roadmap page, links to milestones include url-encoded spaces, but
>> these cause broken links. For example, clicking on our "Release Edition
>> 5.3" takes me to a New Milestone page with the following message at the top:
>> Milestone Release%20Edition%205.3 does not exist. You can create it here.
>>
>> Is there something I have missed in the configuration or does Trac no
>> longer permit spaces in Milestone names?
>>
>> TIA,
>>
>> Rob Hills
>> Waikiki, Western Australia
>>
>
> This shouldn't be happening with Trac 1.4.2. There was no change in the
> allowed characters for milestones. I tested with Trac standalone and the
> HTML on the page is:
>
> <a href="/proj-1.3/milestone/With%20whitespace">
> Milestone: <em>With whitespace</em></a>
>
> The URL encoding in the error message might be a hint as to the problem. I
> think someone else may have raised this issue on the forum, but I can't
> locate it right now.
>
> My best guess would be a plugin or webserver configuration causing the
> problem. Do you have any plugins installed such as SimpleMultiProject?
>
> 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/3b321ce5-b73c-41b3-8ab1-66d19f688d44n%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
On Wednesday, December 23, 2020 at 6:11:40 PM UTC-8 rcp....@gmail.com wrote:

> Hi Ryan, thanks for your reply.
>
> I've since established that the problem is not just with Milestones.
> Versions and Components, two other areas where we have spaces in names
> suffer the same problem.
>
> Re plugins, I carried over the ones from our old installation that were
> supposedly compatible with 1.4. I have:
>
> - TracAccountManager 0.6.dev0
> - TracTags 0.11
> - TracThemeEngine 2.2.4
> - TracXMLRPC 1.1.9
> - TracCrystalXTheme 1.1 (installed but not active as it is broken in
> Trac 1.4.2)
>
> Maybe I should completely uninstall the theme-related ones since they're
> not in use currently anyway?


Worth a try. You could just disable TracThemeEngine and TracCrystalXTheme
through the plugin admin page or directly editing the [components] section
of trac.ini.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/39e17f37-cb34-49bb-8725-b7b65085bf41n%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
OK, I tried disabling both plugins, still have the problem. I've now also
tried uninstalling both TracCrystalXTheme and TracThemeEngine and restarted
my webserver (httpd). Still the problem exists. Trying to edit any
element of the Ticket System that contains a space (in my case I have
records in Components, Milestones, Resolutions and Versions that have one
or more spaces in their Name field) triggers the "invalid ... name" error.

Does anybody with Trac 1.4.2 installed have a Milestone (or Component, or
Resolution or Version!) with a space in its name. If so, can you let me
know what the "edit" URL looks like? An example of a failing URL on my
Trac instance is:

/admin/ticket/milestones/Release%20Edition%205.4

So, for a Milestone with the name "Release Edition 5.4", how should the
Edit URL be encoded?

On Thursday, 24 December 2020 at 10:16:04 UTC+8 RjOllos wrote:

> Worth a try. You could just disable TracThemeEngine and TracCrystalXTheme
> through the plugin admin page or directly editing the [components] section
> of trac.ini.
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/620113c8-c98f-41ef-990a-2a674b477ec7n%40googlegroups.com.
Re: Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
Hi Rob, here's an example milestone with spaces, using Trac 1.4.2 :
https://ms4w.com/trac/milestone/4.1.0%20release

-jeff



On Thu., Dec. 24, 2020, 3:45 a.m. Rob Hills, <rcp.hills@gmail.com> wrote:

> OK, I tried disabling both plugins, still have the problem. I've now also
> tried uninstalling both TracCrystalXTheme and TracThemeEngine and restarted
> my webserver (httpd). Still the problem exists. Trying to edit any
> element of the Ticket System that contains a space (in my case I have
> records in Components, Milestones, Resolutions and Versions that have one
> or more spaces in their Name field) triggers the "invalid ... name" error.
>
> Does anybody with Trac 1.4.2 installed have a Milestone (or Component, or
> Resolution or Version!) with a space in its name. If so, can you let me
> know what the "edit" URL looks like? An example of a failing URL on my
> Trac instance is:
>
> /admin/ticket/milestones/Release%20Edition%205.4
>
> So, for a Milestone with the name "Release Edition 5.4", how should the
> Edit URL be encoded?
>
> On Thursday, 24 December 2020 at 10:16:04 UTC+8 RjOllos wrote:
>
>> Worth a try. You could just disable TracThemeEngine and TracCrystalXTheme
>> through the plugin admin page or directly editing the [components] section
>> of trac.ini.
>>
> --
> 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+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/620113c8-c98f-41ef-990a-2a674b477ec7n%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/620113c8-c98f-41ef-990a-2a674b477ec7n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAPGmwqDSjnbFPj-5jSOSHTGc%2B2CP6qmjFa%3DhR1%3DTiuQJPEgQAw%40mail.gmail.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
On Thursday, December 24, 2020 at 12:45:30 AM UTC-8 rcp....@gmail.com wrote:

> OK, I tried disabling both plugins, still have the problem. I've now also
> tried uninstalling both TracCrystalXTheme and TracThemeEngine and restarted
> my webserver (httpd). Still the problem exists. Trying to edit any
> element of the Ticket System that contains a space (in my case I have
> records in Components, Milestones, Resolutions and Versions that have one
> or more spaces in their Name field) triggers the "invalid ... name" error.
>
> Does anybody with Trac 1.4.2 installed have a Milestone (or Component, or
> Resolution or Version!) with a space in its name. If so, can you let me
> know what the "edit" URL looks like? An example of a failing URL on my
> Trac instance is:
>
> /admin/ticket/milestones/Release%20Edition%205.4
>
> So, for a Milestone with the name "Release Edition 5.4", how should the
> Edit URL be encoded?
>
> On Thursday, 24 December 2020 at 10:16:04 UTC+8 RjOllos wrote:
>
>> Worth a try. You could just disable TracThemeEngine and TracCrystalXTheme
>> through the plugin admin page or directly editing the [components] section
>> of trac.ini.
>>
>

What web server are you running?

Do you have any custom templates in $env/templates? Those will also be
shown on the About Trac page:

[image: Screen Shot 2020-12-24 at 19.44.34.jpg]

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/6def9803-1d68-4d26-8912-c7ff4309b194n%40googlegroups.com.
Re: Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
Thanks for that Jeff. Unfortunately I can't see any difference between the
way Milestone lists are rendered on your site and the way they are rendered
on mine.

On Thursday, 24 December 2020 at 19:15:49 UTC+8 jeffm...@gmail.com wrote:

> Hi Rob, here's an example milestone with spaces, using Trac 1.4.2 :
> https://ms4w.com/trac/milestone/4.1.0%20release
>
> -jeff
>
>
>
> On Thu., Dec. 24, 2020, 3:45 a.m. Rob Hills, <rcp....@gmail.com> wrote:
>
>> OK, I tried disabling both plugins, still have the problem. I've now
>> also tried uninstalling both TracCrystalXTheme and TracThemeEngine and
>> restarted my webserver (httpd). Still the problem exists. Trying to edit
>> any element of the Ticket System that contains a space (in my case I have
>> records in Components, Milestones, Resolutions and Versions that have one
>> or more spaces in their Name field) triggers the "invalid ... name" error.
>>
>> Does anybody with Trac 1.4.2 installed have a Milestone (or Component, or
>> Resolution or Version!) with a space in its name. If so, can you let me
>> know what the "edit" URL looks like? An example of a failing URL on my
>> Trac instance is:
>>
>> /admin/ticket/milestones/Release%20Edition%205.4
>>
>> So, for a Milestone with the name "Release Edition 5.4", how should the
>> Edit URL be encoded?
>>
>> On Thursday, 24 December 2020 at 10:16:04 UTC+8 RjOllos wrote:
>>
>>> Worth a try. You could just disable TracThemeEngine and
>>> TracCrystalXTheme through the plugin admin page or directly editing the
>>> [components] section of trac.ini.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Trac Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to trac-users+...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/trac-users/620113c8-c98f-41ef-990a-2a674b477ec7n%40googlegroups.com
>> <https://groups.google.com/d/msgid/trac-users/620113c8-c98f-41ef-990a-2a674b477ec7n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/d0526975-7b02-4ed7-a737-213958abf575n%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
Thanks again for your replies and suggestions.

There are no custom templates showing on my About Trac page.

I'm running on Apache 2.4.46 on Centos 7 (in cPanel).

On Friday, 25 December 2020 at 11:45:11 UTC+8 RjOllos wrote:

> On Thursday, December 24, 2020 at 12:45:30 AM UTC-8 rcp....@gmail.com
> wrote:
>
>> OK, I tried disabling both plugins, still have the problem. I've now
>> also tried uninstalling both TracCrystalXTheme and TracThemeEngine and
>> restarted my webserver (httpd). Still the problem exists. Trying to edit
>> any element of the Ticket System that contains a space (in my case I have
>> records in Components, Milestones, Resolutions and Versions that have one
>> or more spaces in their Name field) triggers the "invalid ... name" error.
>>
>> Does anybody with Trac 1.4.2 installed have a Milestone (or Component, or
>> Resolution or Version!) with a space in its name. If so, can you let me
>> know what the "edit" URL looks like? An example of a failing URL on my
>> Trac instance is:
>>
>> /admin/ticket/milestones/Release%20Edition%205.4
>>
>> So, for a Milestone with the name "Release Edition 5.4", how should the
>> Edit URL be encoded?
>>
>> On Thursday, 24 December 2020 at 10:16:04 UTC+8 RjOllos wrote:
>>
>>> Worth a try. You could just disable TracThemeEngine and
>>> TracCrystalXTheme through the plugin admin page or directly editing the
>>> [components] section of trac.ini.
>>>
>>
>
> What web server are you running?
>
> Do you have any custom templates in $env/templates? Those will also be
> shown on the About Trac page:
>
> [image: Screen Shot 2020-12-24 at 19.44.34.jpg]
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/9912f182-89f3-4154-a596-0d89102c2873n%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
On Wednesday, December 23, 2020 at 12:18:11 PM UTC-8 rcp....@gmail.com
wrote:

>
> I've just managed to upgrade a long-running Trac instance from a very old
> version of Trac (0.12 IIRC) to 1.4.2 and it's mostly gone well.
>
> However, in our Issue Tracker, all our Milestone names have spaces in them
> and this is causing problems.
>
> On our Roadmap page, links to milestones include url-encoded spaces, but
> these cause broken links. For example, clicking on our "Release Edition
> 5.3" takes me to a New Milestone page with the following message at the top:
> Milestone Release%20Edition%205.3 does not exist. You can create it here.
>
> Is there something I have missed in the configuration or does Trac no
> longer permit spaces in Milestone names?
>
> TIA,
>
> Rob Hills
> Waikiki, Western Australia
>

Could you post a screen capture of the milestone page and a screen capture
after navigation to a milestone fails to show the milestone?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/be8903f7-e75a-4936-b183-0de03aa2eddan%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
Hi again Ryan,

Thanks for your perseverance!

Here are the screenshots, first my milestone list:
(Relative URL: /admin/ticket/milestones )
[image: screenshot-trac-manage-milestones.png]

Then, after I click on "Release Edition 5.2" (though same result from all
of them):
(its relative URL is: /admin/ticket/milestones/Release%20Edition%205.2 )

[image: screenshot-trac-edit-milestone.png]

Note, I get the same result if I try and access milestones other ways, eg
via the Roadmap page.

I've had a look at the data in my database (SQLite). The Milestone names
there are stored with spaces rather than the URL-encoded spaces (%20). Is
that how it should be? I have tried experimenting with adding a new
milestone record with a space in its name. I can do that from the Admin
Interface without any problem, but I still can't edit that new milestone!
However, I've just discovered that I *can delete my newly added Milestone*
from the Milestone Admin list! I don't want to try deleting an existing
Milestone as there is data that I care about associated with those!
On Saturday, 26 December 2020 at 12:43:44 UTC+8 RjOllos wrote:

> On Wednesday, December 23, 2020 at 12:18:11 PM UTC-8 rcp....@gmail.com
> wrote:
>
>>
>> I've just managed to upgrade a long-running Trac instance from a very old
>> version of Trac (0.12 IIRC) to 1.4.2 and it's mostly gone well.
>>
>> However, in our Issue Tracker, all our Milestone names have spaces in
>> them and this is causing problems.
>>
>> On our Roadmap page, links to milestones include url-encoded spaces, but
>> these cause broken links. For example, clicking on our "Release Edition
>> 5.3" takes me to a New Milestone page with the following message at the top:
>> Milestone Release%20Edition%205.3 does not exist. You can create it here.
>>
>> Is there something I have missed in the configuration or does Trac no
>> longer permit spaces in Milestone names?
>>
>> TIA,
>>
>> Rob Hills
>> Waikiki, Western Australia
>>
>
> Could you post a screen capture of the milestone page and a screen capture
> after navigation to a milestone fails to show the milestone?
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/bdacbc2f-f6d4-40b3-b5da-515fb8366ac7n%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
Oh, and for the record, I've just tried adding a Milestone without spaces
in its name (I added "Release_Edition_5.6") and after adding that, I was
able to edit it without any problem. So it's definitely the spaces that
are the issue!

Noting that the database stores the records with spaces rather than the
URL-encoding, presumable at some point in the "Edit" sequence, the
URL-encoding is decoded back to normal ASCII. Might I be able to get
greater visibility of what's going on at that level by cranking up the
logging?

On Sunday, 27 December 2020 at 11:19:46 UTC+8 Rob Hills wrote:

> Hi again Ryan,
>
> Thanks for your perseverance!
>
> Here are the screenshots, first my milestone list:
> (Relative URL: /admin/ticket/milestones )
> [image: screenshot-trac-manage-milestones.png]
>
> Then, after I click on "Release Edition 5.2" (though same result from all
> of them):
> (its relative URL is: /admin/ticket/milestones/Release%20Edition%205.2 )
>
> [image: screenshot-trac-edit-milestone.png]
>
> Note, I get the same result if I try and access milestones other ways, eg
> via the Roadmap page.
>
> I've had a look at the data in my database (SQLite). The Milestone names
> there are stored with spaces rather than the URL-encoded spaces (%20). Is
> that how it should be? I have tried experimenting with adding a new
> milestone record with a space in its name. I can do that from the Admin
> Interface without any problem, but I still can't edit that new milestone!
> However, I've just discovered that I *can delete my newly added Milestone*
> from the Milestone Admin list! I don't want to try deleting an existing
> Milestone as there is data that I care about associated with those!
> On Saturday, 26 December 2020 at 12:43:44 UTC+8 RjOllos wrote:
>
>> On Wednesday, December 23, 2020 at 12:18:11 PM UTC-8 rcp....@gmail.com
>> wrote:
>>
>>>
>>> I've just managed to upgrade a long-running Trac instance from a very
>>> old version of Trac (0.12 IIRC) to 1.4.2 and it's mostly gone well.
>>>
>>> However, in our Issue Tracker, all our Milestone names have spaces in
>>> them and this is causing problems.
>>>
>>> On our Roadmap page, links to milestones include url-encoded spaces, but
>>> these cause broken links. For example, clicking on our "Release Edition
>>> 5.3" takes me to a New Milestone page with the following message at the top:
>>> Milestone Release%20Edition%205.3 does not exist. You can create it
>>> here.
>>>
>>> Is there something I have missed in the configuration or does Trac no
>>> longer permit spaces in Milestone names?
>>>
>>> TIA,
>>>
>>> Rob Hills
>>> Waikiki, Western Australia
>>>
>>
>> Could you post a screen capture of the milestone page and a screen
>> capture after navigation to a milestone fails to show the milestone?
>>
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/35b47e1d-2a27-4084-b426-d3124e03f16dn%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
On Saturday, December 26, 2020 at 7:25:25 PM UTC-8 rcp....@gmail.com wrote:

> Oh, and for the record, I've just tried adding a Milestone without spaces
> in its name (I added "Release_Edition_5.6") and after adding that, I was
> able to edit it without any problem. So it's definitely the spaces that
> are the issue!
>
> Noting that the database stores the records with spaces rather than the
> URL-encoding, presumable at some point in the "Edit" sequence, the
> URL-encoding is decoded back to normal ASCII. Might I be able to get
> greater visibility of what's going on at that level by cranking up the
> logging?
>

Yeah, good idea. The URL value should be decoded by the Trac front-end and
stored as space-separated in the database. Here are some select excerpts
from the log when navigating to "Release Edition 5.3" with TracStandalone
as the webserver:

11:43:52 Trac[main] DEBUG: Dispatching <RequestWithSession "GET
'/milestone/Release Edition 5.3'">
...
11:47:13 Trac[perm] DEBUG: DefaultPermissionPolicy allows user1 performing
MILESTONE_VIEW on <Resource u'milestone:Release Edition 5.3'>
...
11:47:13 Trac[main] WARNING: [127.0.0.1] HTTPNotFound: 404 Not Found (File
your_project_logo.png not found), <RequestWithSession "GET
'/chrome/site/your_project_logo.png'">, referrer
'http://localhost:8001/proj-1.4/milestone/Release%20Edition%205.3'


At the moment I don't remember where the decoding occurs, but I'm pretty
sure it's in the Request class:
https://trac.edgewall.org/browser/tags/trac-1.4.2/trac/web/api.py

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/3f68e5c6-6313-47fb-b056-003d649b5a2en%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
Unfortunately the debug log doesn't seem to help much AFAICT. No
exceptions or errors seen. Here is the log from when I click on a
Milestone to edit it (some identifying details obfuscated)...
2020-12-28 10:00:57,746 Trac[main] DEBUG: Dispatching <RequestWithSession
"GET '/milestone/Release%20Edition%205.3'">
2020-12-28 10:00:57,747 Trac[main] DEBUG: Chosen handler is <Component
trac.ticket.roadmap.MilestoneModule>
2020-12-28 10:00:57,749 Trac[session] DEBUG: Retrieving session for ID
u'rob'
2020-12-28 10:00:57,752 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing ACCTMGR_USER_ADMIN on None
2020-12-28 10:00:57,752 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing MILESTONE_VIEW on <Resource
u'milestone:Release%20Edition%205.3'>
2020-12-28 10:00:57,752 Trac[chrome] DEBUG: Prepare chrome data for request
2020-12-28 10:00:57,754 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing ACCTMGR_CONFIG_ADMIN on None
2020-12-28 10:00:57,754 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TRAC_ADMIN on <Resource u'admin:general/basics'>
2020-12-28 10:00:57,754 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TRAC_ADMIN on <Resource u'admin:general/logging'>
2020-12-28 10:00:57,755 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing PERMISSION_GRANT on <Resource u'admin:general/perm'>
2020-12-28 10:00:57,755 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TRAC_ADMIN on <Resource u'admin:general/plugin'>
2020-12-28 10:00:57,755 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_ADMIN on <Resource u'admin:ticket/components'>
2020-12-28 10:00:57,755 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing MILESTONE_ADMIN on <Resource u'admin:ticket/milestones'>
2020-12-28 10:00:57,755 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_ADMIN on <Resource u'admin:ticket/versions'>
2020-12-28 10:00:57,756 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_ADMIN on <Resource u'admin:ticket/priority'>
2020-12-28 10:00:57,756 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_ADMIN on <Resource u'admin:ticket/resolution'>
2020-12-28 10:00:57,756 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_ADMIN on <Resource u'admin:ticket/severity'>
2020-12-28 10:00:57,756 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_ADMIN on <Resource u'admin:ticket/type'>
2020-12-28 10:00:57,757 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing VERSIONCONTROL_ADMIN on <Resource
u'admin:versioncontrol/repository'>
2020-12-28 10:00:57,757 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TAGS_ADMIN on None
2020-12-28 10:00:57,758 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing SEARCH_VIEW on None
2020-12-28 10:00:57,759 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing ROADMAP_VIEW on None
2020-12-28 10:00:57,759 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_VIEW on <Resource 'ticket'>
2020-12-28 10:00:57,759 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing REPORT_VIEW on <Resource u'report:-1'>
2020-12-28 10:00:57,759 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_CREATE on None
2020-12-28 10:00:57,760 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TIMELINE_VIEW on <Resource 'timeline'>
2020-12-28 10:00:57,760 Trac[PyGIT] DEBUG: PyGIT.Storage instance for
'/..../repos/git/wacg/wacg_tracker.git' is constructed
2020-12-28 10:00:57,761 Trac[PyGIT] DEBUG: requested weak PyGIT.Storage
instance for '/..../repos/git/wacg/wacg_tracker.git'
2020-12-28 10:00:57,761 Trac[git_fs] DEBUG: disabled CachedRepository for
'/..../repos/git/wacg/wacg_tracker.git'
2020-12-28 10:00:57,761 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing BROWSER_VIEW on <Resource u'repository, source:/'>
2020-12-28 10:00:57,761 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing WIKI_VIEW on <Resource u'wiki:WikiStart'>
2020-12-28 10:00:57,762 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing WIKI_VIEW on <Resource u'wiki:TracGuide'>
2020-12-28 10:00:57,762 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_VIEW_HOURS on None
2020-12-28 10:00:57,762 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TAGS_VIEW on None
2020-12-28 10:00:57,763 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing MILESTONE_CREATE on <Resource
u'milestone:Release%20Edition%205.3'>
2020-12-28 10:00:57,769 Trac[main] DEBUG: Rendering response with template
milestone_edit.html
2020-12-28 10:00:57,855 Trac[main] DEBUG: Dispatching <RequestWithSession
"GET '/chrome/site/your_project_logo.png'">
2020-12-28 10:00:57,856 Trac[main] DEBUG: Chosen handler is <Component
trac.web.chrome.Chrome>
2020-12-28 10:00:57,857 Trac[session] DEBUG: Retrieving session for ID
u'rob'
2020-12-28 10:00:57,859 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing ACCTMGR_USER_ADMIN on None
2020-12-28 10:00:57,859 Trac[chrome] WARNING: File your_project_logo.png
not found in any of ['/..../trac/venv/trac_project/htdocs']
2020-12-28 10:00:57,860 Trac[main] WARNING: [124.188.231.240] HTTPNotFound:
404 Not Found (File your_project_logo.png not found), <RequestWithSession
"GET '/chrome/site/your_project_logo.png'">, referrer
'http://tracker.blah.thing.com.au/milestone/Release%20Edition%205.3'
2020-12-28 10:00:57,860 Trac[chrome] DEBUG: Prepare chrome data for request
2020-12-28 10:00:57,862 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing ACCTMGR_CONFIG_ADMIN on None
2020-12-28 10:00:57,862 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TRAC_ADMIN on <Resource u'admin:general/basics'>
2020-12-28 10:00:57,862 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TRAC_ADMIN on <Resource u'admin:general/logging'>
2020-12-28 10:00:57,862 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing PERMISSION_GRANT on <Resource u'admin:general/perm'>
2020-12-28 10:00:57,862 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TRAC_ADMIN on <Resource u'admin:general/plugin'>
2020-12-28 10:00:57,863 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_ADMIN on <Resource u'admin:ticket/components'>
2020-12-28 10:00:57,863 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing MILESTONE_ADMIN on <Resource u'admin:ticket/milestones'>
2020-12-28 10:00:57,863 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_ADMIN on <Resource u'admin:ticket/versions'>
2020-12-28 10:00:57,863 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_ADMIN on <Resource u'admin:ticket/priority'>
2020-12-28 10:00:57,863 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_ADMIN on <Resource u'admin:ticket/resolution'>
2020-12-28 10:00:57,863 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_ADMIN on <Resource u'admin:ticket/severity'>
2020-12-28 10:00:57,864 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_ADMIN on <Resource u'admin:ticket/type'>
2020-12-28 10:00:57,864 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing VERSIONCONTROL_ADMIN on <Resource
u'admin:versioncontrol/repository'>
2020-12-28 10:00:57,864 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TAGS_ADMIN on None
2020-12-28 10:00:57,865 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing SEARCH_VIEW on None
2020-12-28 10:00:57,865 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing ROADMAP_VIEW on None
2020-12-28 10:00:57,866 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_VIEW on <Resource 'ticket'>
2020-12-28 10:00:57,866 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing REPORT_VIEW on <Resource u'report:-1'>
2020-12-28 10:00:57,866 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_CREATE on None
2020-12-28 10:00:57,867 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TIMELINE_VIEW on <Resource 'timeline'>
2020-12-28 10:00:57,867 Trac[PyGIT] DEBUG: PyGIT.Storage instance for
'/..../repos/git/wacg/wacg_tracker.git' is constructed
2020-12-28 10:00:57,867 Trac[PyGIT] DEBUG: requested weak PyGIT.Storage
instance for '/..../repos/git/wacg/wacg_tracker.git'
2020-12-28 10:00:57,868 Trac[git_fs] DEBUG: disabled CachedRepository for
'/..../repos/git/wacg/wacg_tracker.git'
2020-12-28 10:00:57,868 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing BROWSER_VIEW on <Resource u'repository, source:/'>
2020-12-28 10:00:57,868 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing WIKI_VIEW on <Resource u'wiki:WikiStart'>
2020-12-28 10:00:57,869 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing WIKI_VIEW on <Resource u'wiki:TracGuide'>
2020-12-28 10:00:57,869 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TICKET_VIEW_HOURS on None
2020-12-28 10:00:57,869 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing TAGS_VIEW on None
2020-12-28 10:00:57,897 Trac[main] DEBUG: Dispatching <RequestWithSession
"GET '/chrome/common/trac.ico'">
2020-12-28 10:00:57,898 Trac[main] DEBUG: Chosen handler is <Component
trac.web.chrome.Chrome>
2020-12-28 10:00:57,899 Trac[session] DEBUG: Retrieving session for ID
u'rob'
2020-12-28 10:00:57,901 Trac[perm] DEBUG: DefaultPermissionPolicy allows
rob performing ACCTMGR_USER_ADMIN on None

I can't see anything in the above that helps me with this problem.

On Monday, 28 December 2020 at 03:52:43 UTC+8 RjOllos wrote:

> On Saturday, December 26, 2020 at 7:25:25 PM UTC-8 rcp....@gmail.com
> wrote:
>
>> Oh, and for the record, I've just tried adding a Milestone without spaces
>> in its name (I added "Release_Edition_5.6") and after adding that, I was
>> able to edit it without any problem. So it's definitely the spaces that
>> are the issue!
>>
>> Noting that the database stores the records with spaces rather than the
>> URL-encoding, presumable at some point in the "Edit" sequence, the
>> URL-encoding is decoded back to normal ASCII. Might I be able to get
>> greater visibility of what's going on at that level by cranking up the
>> logging?
>>
>
> Yeah, good idea. The URL value should be decoded by the Trac front-end and
> stored as space-separated in the database. Here are some select excerpts
> from the log when navigating to "Release Edition 5.3" with TracStandalone
> as the webserver:
>
> 11:43:52 Trac[main] DEBUG: Dispatching <RequestWithSession "GET
> '/milestone/Release Edition 5.3'">
> ...
> 11:47:13 Trac[perm] DEBUG: DefaultPermissionPolicy allows user1 performing
> MILESTONE_VIEW on <Resource u'milestone:Release Edition 5.3'>
> ...
> 11:47:13 Trac[main] WARNING: [127.0.0.1] HTTPNotFound: 404 Not Found (File
> your_project_logo.png not found), <RequestWithSession "GET
> '/chrome/site/your_project_logo.png'">, referrer '
> http://localhost:8001/proj-1.4/milestone/Release%20Edition%205.3'
>
>
> At the moment I don't remember where the decoding occurs, but I'm pretty
> sure it's in the Request class:
> https://trac.edgewall.org/browser/tags/trac-1.4.2/trac/web/api.py
>
> 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/00aff88a-db61-4642-a8a8-c8fcec89cbd2n%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
Earlier on the log there are some references to some plugins not loading,
eg this one:
2020-12-28 09:28:53,795 Trac[loader] DEBUG: Loading plugin
"acct_mgr.opt.announcer.uid_chg" from
"/..../trac/venv/lib/python2.7/site-packages"
2020-12-28 09:28:53,805 Trac[loader] DEBUG: Skipping
"acct_mgr.opt.announcer.uid_chg = acct_mgr.opt.announcer.uid_chg
[announcer]": DistributionNotFound: The 'TracAnnouncer; extra ==
"announcer"' distribution was not found and is required by the application

I haven't ever loaded or installed this plugin so I'm not sure why it's
even being loaded, but maybe it's a core part of Trac? If so, does it
matter if they don't load? Could one of these be behind my problem?


On Monday, 28 December 2020 at 21:37:46 UTC+8 Rob Hills wrote:

> Unfortunately the debug log doesn't seem to help much AFAICT. No
> exceptions or errors seen. Here is the log from when I click on a
> Milestone to edit it (some identifying details obfuscated)...
> 2020-12-28 10:00:57,746 Trac[main] DEBUG: Dispatching <RequestWithSession
> "GET '/milestone/Release%20Edition%205.3'">
> 2020-12-28 10:00:57,747 Trac[main] DEBUG: Chosen handler is <Component
> trac.ticket.roadmap.MilestoneModule>
> 2020-12-28 10:00:57,749 Trac[session] DEBUG: Retrieving session for ID
> u'rob'
> 2020-12-28 10:00:57,752 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing ACCTMGR_USER_ADMIN on None
> 2020-12-28 10:00:57,752 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing MILESTONE_VIEW on <Resource
> u'milestone:Release%20Edition%205.3'>
> 2020-12-28 10:00:57,752 Trac[chrome] DEBUG: Prepare chrome data for request
> 2020-12-28 10:00:57,754 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing ACCTMGR_CONFIG_ADMIN on None
> 2020-12-28 10:00:57,754 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TRAC_ADMIN on <Resource u'admin:general/basics'>
> 2020-12-28 10:00:57,754 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TRAC_ADMIN on <Resource u'admin:general/logging'>
> 2020-12-28 10:00:57,755 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing PERMISSION_GRANT on <Resource u'admin:general/perm'>
> 2020-12-28 10:00:57,755 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TRAC_ADMIN on <Resource u'admin:general/plugin'>
> 2020-12-28 10:00:57,755 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_ADMIN on <Resource u'admin:ticket/components'>
> 2020-12-28 10:00:57,755 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing MILESTONE_ADMIN on <Resource u'admin:ticket/milestones'>
> 2020-12-28 10:00:57,755 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_ADMIN on <Resource u'admin:ticket/versions'>
> 2020-12-28 10:00:57,756 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_ADMIN on <Resource u'admin:ticket/priority'>
> 2020-12-28 10:00:57,756 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_ADMIN on <Resource u'admin:ticket/resolution'>
> 2020-12-28 10:00:57,756 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_ADMIN on <Resource u'admin:ticket/severity'>
> 2020-12-28 10:00:57,756 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_ADMIN on <Resource u'admin:ticket/type'>
> 2020-12-28 10:00:57,757 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing VERSIONCONTROL_ADMIN on <Resource
> u'admin:versioncontrol/repository'>
> 2020-12-28 10:00:57,757 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TAGS_ADMIN on None
> 2020-12-28 10:00:57,758 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing SEARCH_VIEW on None
> 2020-12-28 10:00:57,759 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing ROADMAP_VIEW on None
> 2020-12-28 10:00:57,759 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_VIEW on <Resource 'ticket'>
> 2020-12-28 10:00:57,759 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing REPORT_VIEW on <Resource u'report:-1'>
> 2020-12-28 10:00:57,759 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_CREATE on None
> 2020-12-28 10:00:57,760 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TIMELINE_VIEW on <Resource 'timeline'>
> 2020-12-28 10:00:57,760 Trac[PyGIT] DEBUG: PyGIT.Storage instance for
> '/..../repos/git/wacg/wacg_tracker.git' is constructed
> 2020-12-28 10:00:57,761 Trac[PyGIT] DEBUG: requested weak PyGIT.Storage
> instance for '/..../repos/git/wacg/wacg_tracker.git'
> 2020-12-28 10:00:57,761 Trac[git_fs] DEBUG: disabled CachedRepository for
> '/..../repos/git/wacg/wacg_tracker.git'
> 2020-12-28 10:00:57,761 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing BROWSER_VIEW on <Resource u'repository, source:/'>
> 2020-12-28 10:00:57,761 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing WIKI_VIEW on <Resource u'wiki:WikiStart'>
> 2020-12-28 10:00:57,762 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing WIKI_VIEW on <Resource u'wiki:TracGuide'>
> 2020-12-28 10:00:57,762 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_VIEW_HOURS on None
> 2020-12-28 10:00:57,762 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TAGS_VIEW on None
> 2020-12-28 10:00:57,763 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing MILESTONE_CREATE on <Resource
> u'milestone:Release%20Edition%205.3'>
> 2020-12-28 10:00:57,769 Trac[main] DEBUG: Rendering response with template
> milestone_edit.html
> 2020-12-28 10:00:57,855 Trac[main] DEBUG: Dispatching <RequestWithSession
> "GET '/chrome/site/your_project_logo.png'">
> 2020-12-28 10:00:57,856 Trac[main] DEBUG: Chosen handler is <Component
> trac.web.chrome.Chrome>
> 2020-12-28 10:00:57,857 Trac[session] DEBUG: Retrieving session for ID
> u'rob'
> 2020-12-28 10:00:57,859 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing ACCTMGR_USER_ADMIN on None
> 2020-12-28 10:00:57,859 Trac[chrome] WARNING: File your_project_logo.png
> not found in any of ['/..../trac/venv/trac_project/htdocs']
> 2020-12-28 10:00:57,860 Trac[main] WARNING: [124.188.231.240]
> HTTPNotFound: 404 Not Found (File your_project_logo.png not found),
> <RequestWithSession "GET '/chrome/site/your_project_logo.png'">, referrer '
> http://tracker.blah.thing.com.au/milestone/Release%20Edition%205.3'
> 2020-12-28 10:00:57,860 Trac[chrome] DEBUG: Prepare chrome data for request
> 2020-12-28 10:00:57,862 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing ACCTMGR_CONFIG_ADMIN on None
> 2020-12-28 10:00:57,862 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TRAC_ADMIN on <Resource u'admin:general/basics'>
> 2020-12-28 10:00:57,862 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TRAC_ADMIN on <Resource u'admin:general/logging'>
> 2020-12-28 10:00:57,862 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing PERMISSION_GRANT on <Resource u'admin:general/perm'>
> 2020-12-28 10:00:57,862 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TRAC_ADMIN on <Resource u'admin:general/plugin'>
> 2020-12-28 10:00:57,863 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_ADMIN on <Resource u'admin:ticket/components'>
> 2020-12-28 10:00:57,863 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing MILESTONE_ADMIN on <Resource u'admin:ticket/milestones'>
> 2020-12-28 10:00:57,863 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_ADMIN on <Resource u'admin:ticket/versions'>
> 2020-12-28 10:00:57,863 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_ADMIN on <Resource u'admin:ticket/priority'>
> 2020-12-28 10:00:57,863 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_ADMIN on <Resource u'admin:ticket/resolution'>
> 2020-12-28 10:00:57,863 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_ADMIN on <Resource u'admin:ticket/severity'>
> 2020-12-28 10:00:57,864 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_ADMIN on <Resource u'admin:ticket/type'>
> 2020-12-28 10:00:57,864 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing VERSIONCONTROL_ADMIN on <Resource
> u'admin:versioncontrol/repository'>
> 2020-12-28 10:00:57,864 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TAGS_ADMIN on None
> 2020-12-28 10:00:57,865 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing SEARCH_VIEW on None
> 2020-12-28 10:00:57,865 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing ROADMAP_VIEW on None
> 2020-12-28 10:00:57,866 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_VIEW on <Resource 'ticket'>
> 2020-12-28 10:00:57,866 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing REPORT_VIEW on <Resource u'report:-1'>
> 2020-12-28 10:00:57,866 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_CREATE on None
> 2020-12-28 10:00:57,867 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TIMELINE_VIEW on <Resource 'timeline'>
> 2020-12-28 10:00:57,867 Trac[PyGIT] DEBUG: PyGIT.Storage instance for
> '/..../repos/git/wacg/wacg_tracker.git' is constructed
> 2020-12-28 10:00:57,867 Trac[PyGIT] DEBUG: requested weak PyGIT.Storage
> instance for '/..../repos/git/wacg/wacg_tracker.git'
> 2020-12-28 10:00:57,868 Trac[git_fs] DEBUG: disabled CachedRepository for
> '/..../repos/git/wacg/wacg_tracker.git'
> 2020-12-28 10:00:57,868 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing BROWSER_VIEW on <Resource u'repository, source:/'>
> 2020-12-28 10:00:57,868 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing WIKI_VIEW on <Resource u'wiki:WikiStart'>
> 2020-12-28 10:00:57,869 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing WIKI_VIEW on <Resource u'wiki:TracGuide'>
> 2020-12-28 10:00:57,869 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TICKET_VIEW_HOURS on None
> 2020-12-28 10:00:57,869 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing TAGS_VIEW on None
> 2020-12-28 10:00:57,897 Trac[main] DEBUG: Dispatching <RequestWithSession
> "GET '/chrome/common/trac.ico'">
> 2020-12-28 10:00:57,898 Trac[main] DEBUG: Chosen handler is <Component
> trac.web.chrome.Chrome>
> 2020-12-28 10:00:57,899 Trac[session] DEBUG: Retrieving session for ID
> u'rob'
> 2020-12-28 10:00:57,901 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing ACCTMGR_USER_ADMIN on None
>
> I can't see anything in the above that helps me with this problem.
>
> On Monday, 28 December 2020 at 03:52:43 UTC+8 RjOllos wrote:
>
>> On Saturday, December 26, 2020 at 7:25:25 PM UTC-8 rcp....@gmail.com
>> wrote:
>>
>>> Oh, and for the record, I've just tried adding a Milestone without
>>> spaces in its name (I added "Release_Edition_5.6") and after adding that, I
>>> was able to edit it without any problem. So it's definitely the spaces
>>> that are the issue!
>>>
>>> Noting that the database stores the records with spaces rather than the
>>> URL-encoding, presumable at some point in the "Edit" sequence, the
>>> URL-encoding is decoded back to normal ASCII. Might I be able to get
>>> greater visibility of what's going on at that level by cranking up the
>>> logging?
>>>
>>
>> Yeah, good idea. The URL value should be decoded by the Trac front-end
>> and stored as space-separated in the database. Here are some select
>> excerpts from the log when navigating to "Release Edition 5.3" with
>> TracStandalone as the webserver:
>>
>> 11:43:52 Trac[main] DEBUG: Dispatching <RequestWithSession "GET
>> '/milestone/Release Edition 5.3'">
>> ...
>> 11:47:13 Trac[perm] DEBUG: DefaultPermissionPolicy allows user1
>> performing MILESTONE_VIEW on <Resource u'milestone:Release Edition 5.3'>
>> ...
>> 11:47:13 Trac[main] WARNING: [127.0.0.1] HTTPNotFound: 404 Not Found
>> (File your_project_logo.png not found), <RequestWithSession "GET
>> '/chrome/site/your_project_logo.png'">, referrer '
>> http://localhost:8001/proj-1.4/milestone/Release%20Edition%205.3'
>>
>>
>> At the moment I don't remember where the decoding occurs, but I'm pretty
>> sure it's in the Request class:
>> https://trac.edgewall.org/browser/tags/trac-1.4.2/trac/web/api.py
>>
>> 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/c364c7e1-d6e8-4250-a33a-e67a89bbd6ean%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
On Monday, December 28, 2020 at 5:37:46 AM UTC-8 rcp....@gmail.com wrote:

> Unfortunately the debug log doesn't seem to help much AFAICT. No
> exceptions or errors seen. Here is the log from when I click on a
> Milestone to edit it (some identifying details obfuscated)...
> 2020-12-28 10:00:57,746 Trac[main] DEBUG: Dispatching <RequestWithSession
> "GET '/milestone/Release%20Edition%205.3'">
> 2020-12-28 10:00:57,747 Trac[main] DEBUG: Chosen handler is <Component
> trac.ticket.roadmap.MilestoneModule>
> 2020-12-28 10:00:57,749 Trac[session] DEBUG: Retrieving session for ID
> u'rob'
> 2020-12-28 10:00:57,752 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing ACCTMGR_USER_ADMIN on None
> 2020-12-28 10:00:57,752 Trac[perm] DEBUG: DefaultPermissionPolicy allows
> rob performing MILESTONE_VIEW on <Resource
> u'milestone:Release%20Edition%205.3'>
>

The resource id should have been decoded. Compare to the log I sent which
has:

Dispatching <RequestWithSession "GET '/milestone/*Release Edition 5.3'*">
...
DefaultPermissionPolicy allows user1 performing MILESTONE_VIEW on <Resource
u'milestone:*Release Edition 5.3*'>

I'll take a look at the codebase and see if I have any guesses as to the
problem.

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/c6befdeb-3d45-4c99-ad0d-1f3083391335n%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
On Friday, December 25, 2020 at 8:09:01 AM UTC-8 rcp....@gmail.com wrote:

> Thanks again for your replies and suggestions.
>
> There are no custom templates showing on my About Trac page.
>
> I'm running on Apache 2.4.46 on Centos 7 (in cPanel).
>

Which module are you using?: mod_wsgi, mod_python, mod_fcgi, mod_cgi, or
another?

This is the first time I've explored this detail, but it seems that the
unquoting is done by the WSGI layer.

Is it possible you have a rewrite rule in Apache that is affecting this?

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/a18e42e5-6bdf-482f-9b99-c4b27d9172dfn%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
On Saturday, December 26, 2020 at 7:19:46 PM UTC-8 rcp....@gmail.com wrote:

> Hi again Ryan,
>
> Thanks for your perseverance!
>

Thank you for your perseverance as well! I'm sure this is not the best user
experience, but we will get to the bottom of this eventually and maybe we
can find a way to make Trac better along the way.

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/06f3642b-ca62-44f2-887d-27ea6bde720fn%40googlegroups.com.
Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
Hi again Ryan,

I am using mod_wsgi but because I am locked in to cPanel here, I have to
use the one that cPanel permits in its framework. I gather cPanel uses the
[https://www.phusionpassenger.com/docs/tutorials/what_is_passenger/ Phusion
Passenger] App server. It was quite a process getting Trac to even work
with this, I had to Google widely and knit together multiple tidbits of
information! Unfortunately this means that lots of the nuts and bolts
(like the Apache configuration) are hidden from the user.

So, it's entirely possible I've mucked something up along the way to cause
this issue.

My Trac instance web root has the following structure (the symlinks were
necessitated by Passenger!):

- cgi-bin folder
- htdocs folder
- public folder (symlink to htdocs)
- passenger_wsgi.py (symlink to cgi-bin/trac.wsgi)

The contents of my trac.wsgi (with a little obfuscation) had to be tweaked
slightly from the one created by Trac and is as follows:
#!/<various-folders>/applications/trac/venv/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C)2008-2009 Edgewall Software
# Copyright (C) 2008 Noah Kantrowitz <email-address-removed>
# 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 https://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 https://trac.edgewall.org/log/.
#
# Author: Noah Kantrowitz <email-address-removed>
import sys, os
INTERP = "/<various-folders>/applications/trac/venv/bin/python"
#INTERP is present twice so that the new Python interpreter knows the
actual executable path
if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)

def application(environ, start_request):
if not 'trac.env_parent_dir' in environ:
environ.setdefault('trac.env_path', '/<various-folders>
/applications/trac/venv/trac_project')
if 'PYTHON_EGG_CACHE' in environ:
os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
elif 'trac.env_path' in environ:
os.environ['PYTHON_EGG_CACHE'] = \
os.path.join(environ['trac.env_path'], '.egg-cache')
elif 'trac.env_parent_dir' in environ:
os.environ['PYTHON_EGG_CACHE'] = \
os.path.join(environ['trac.env_parent_dir'], '.egg-cache')
from trac.web.main import dispatch_request
return dispatch_request(environ, start_request)

Maybe I need to put some debug logging in here? If so, where/what would
you suggest?

Cheers,

Rob Hills
Waikiki, Western Australia
On Tuesday, 29 December 2020 at 12:44:45 UTC+8 RjOllos wrote:

> On Friday, December 25, 2020 at 8:09:01 AM UTC-8 rcp....@gmail.com wrote:
>
>> Thanks again for your replies and suggestions.
>>
>> There are no custom templates showing on my About Trac page.
>>
>> I'm running on Apache 2.4.46 on Centos 7 (in cPanel).
>>
>
> Which module are you using?: mod_wsgi, mod_python, mod_fcgi, mod_cgi, or
> another?
>
> This is the first time I've explored this detail, but it seems that the
> unquoting is done by the WSGI layer.
>
> Is it possible you have a rewrite rule in Apache that is affecting this?
>
> 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/b70c8539-99ae-47e0-80e6-5d77734babfdn%40googlegroups.com.
Re: Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
On Mon, Dec 28, 2020 at 9:50 PM Rob Hills <rcp.hills@gmail.com> wrote:

> Hi again Ryan,
>
> I am using mod_wsgi but because I am locked in to cPanel here, I have to
> use the one that cPanel permits in its framework. I gather cPanel uses the
> [https://www.phusionpassenger.com/docs/tutorials/what_is_passenger/
> Phusion Passenger] App server. It was quite a process getting Trac to even
> work with this, I had to Google widely and knit together multiple tidbits
> of information! Unfortunately this means that lots of the nuts and bolts
> (like the Apache configuration) are hidden from the user.
>
> So, it's entirely possible I've mucked something up along the way to cause
> this issue.
>
> My Trac instance web root has the following structure (the symlinks were
> necessitated by Passenger!):
>
> - cgi-bin folder
> - htdocs folder
> - public folder (symlink to htdocs)
> - passenger_wsgi.py (symlink to cgi-bin/trac.wsgi)
>
> The contents of my trac.wsgi (with a little obfuscation) had to be tweaked
> slightly from the one created by Trac and is as follows:
> #!/<various-folders>/applications/trac/venv/bin/python
> # -*- coding: utf-8 -*-
> #
> # Copyright (C)2008-2009 Edgewall Software
> # Copyright (C) 2008 Noah Kantrowitz <email-address-removed>
> # 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 https://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 https://trac.edgewall.org/log/.
> #
> # Author: Noah Kantrowitz <email-address-removed>
> import sys, os
> INTERP = "/<various-folders>/applications/trac/venv/bin/python"
> #INTERP is present twice so that the new Python interpreter knows the
> actual executable path
> if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)
>
> def application(environ, start_request):
> if not 'trac.env_parent_dir' in environ:
> environ.setdefault('trac.env_path', '/<various-folders>
> /applications/trac/venv/trac_project')
> if 'PYTHON_EGG_CACHE' in environ:
> os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
> elif 'trac.env_path' in environ:
> os.environ['PYTHON_EGG_CACHE'] = \
> os.path.join(environ['trac.env_path'], '.egg-cache')
> elif 'trac.env_parent_dir' in environ:
> os.environ['PYTHON_EGG_CACHE'] = \
> os.path.join(environ['trac.env_parent_dir'], '.egg-cache')
> from trac.web.main import dispatch_request
> return dispatch_request(environ, start_request)
>
> Maybe I need to put some debug logging in here? If so, where/what would
> you suggest?
>

With TracStandalone I pprint'ed the environ dict at the start of
dispatch_request:

{'CONTENT_TYPE': 'text/plain',
'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate, br',
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.9,fr-FR;q=0.8,fr;q=0.7',
'HTTP_AUTHORIZATION': 'Digest username="user1", realm="trac",
nonce="854d06777afa9b9a5b0243a3a7453d5e",
uri="/proj-1.4/milestone/Release%20Edition%205.3",
response="b90c6b243cc22c34aef5ce336e9865e3", qop=auth, nc=00000028,
cnonce="6ddef167d2ec8331"',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE': 'trac_form_token=6fedb0898635ff6cb18e7231;
trac_auth=db9c3ee6304876204f470c8217fdba24',
'HTTP_HOST': 'localhost:8001',
'HTTP_REFERER': 'http://localhost:8001/proj-1.4/roadmap',
'HTTP_SEC_FETCH_DEST': 'document',
'HTTP_SEC_FETCH_MODE': 'navigate',
'HTTP_SEC_FETCH_SITE': 'same-origin',
'HTTP_SEC_FETCH_USER': '?1',
'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36',
'PATH_INFO': '/proj-1.4/milestone/Release Edition 5.3',
'QUERY_STRING': '',

But I don't suppose the output would be captured anywhere visible if you
put at the start of the application function?:

import pprint
pprint.pprint(environ)

But maybe Passenger would capture it in a log? Or you could open a file and
output to a file?

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CA%2BBGpn8jTApHHJco2OExXe_u4VBrYhfeQpgU14dzU4yGxanq%2Bg%40mail.gmail.com.
Re: Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
On Tue, Dec 29, 2020 at 3:39 PM Ryan Ollos <rjollos@gmail.com> wrote:
>
> On Mon, Dec 28, 2020 at 9:50 PM Rob Hills <rcp.hills@gmail.com> wrote:
>>
>> Hi again Ryan,
>>
>> I am using mod_wsgi but because I am locked in to cPanel here, I have to use the one that cPanel permits in its framework. I gather cPanel uses the [https://www.phusionpassenger.com/docs/tutorials/what_is_passenger/ Phusion Passenger] App server. It was quite a process getting Trac to even work with this, I had to Google widely and knit together multiple tidbits of information! Unfortunately this means that lots of the nuts and bolts (like the Apache configuration) are hidden from the user.
>>
>> So, it's entirely possible I've mucked something up along the way to cause this issue.
>>
>> My Trac instance web root has the following structure (the symlinks were necessitated by Passenger!):
>>
>> cgi-bin folder
>> htdocs folder
>> public folder (symlink to htdocs)
>> passenger_wsgi.py (symlink to cgi-bin/trac.wsgi)
> ...
> But maybe Passenger would capture it in a log? Or you could open a file and output to a file?
>
> Ryan

The issue has been reported at
https://github.com/phusion/passenger/issues/1828, however it is not
fixed yet.

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMai6MiLFWqZCMWYJJtLVVhG9-T%3D15hGYrpfGvmPeqh%2BLbg%40mail.gmail.com.
Re: Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
On Monday, December 28, 2020 at 11:17:41 PM UTC-8 Jun Omae wrote:

> On Tue, Dec 29, 2020 at 3:39 PM Ryan Ollos <rjo...@gmail.com> wrote:
> >
> > On Mon, Dec 28, 2020 at 9:50 PM Rob Hills <rcp....@gmail.com> wrote:
> >>
> >> Hi again Ryan,
> >>
> >> I am using mod_wsgi but because I am locked in to cPanel here, I have
> to use the one that cPanel permits in its framework. I gather cPanel uses
> the [https://www.phusionpassenger.com/docs/tutorials/what_is_passenger/
> Phusion Passenger] App server. It was quite a process getting Trac to even
> work with this, I had to Google widely and knit together multiple tidbits
> of information! Unfortunately this means that lots of the nuts and bolts
> (like the Apache configuration) are hidden from the user.
> >>
> >> So, it's entirely possible I've mucked something up along the way to
> cause this issue.
> >>
> >> My Trac instance web root has the following structure (the symlinks
> were necessitated by Passenger!):
> >>
> >> cgi-bin folder
> >> htdocs folder
> >> public folder (symlink to htdocs)
> >> passenger_wsgi.py (symlink to cgi-bin/trac.wsgi)
> > ...
> > But maybe Passenger would capture it in a log? Or you could open a file
> and output to a file?
> >
> > Ryan
>
> The issue has been reported at
> https://github.com/phusion/passenger/issues/1828, however it is not
> fixed yet.
>
>
Good find!

Would it be a sufficient workaround to modify the environ dict?

import urllib
environ['PATH_INFO'] = urllib.unquote(environ['PATH_INFO'])

I wonder why the issue wasn't seen before upgrading from 0.12.x.

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/a743e81d-8657-46ac-b66d-ac0a76525240n%40googlegroups.com.
Re: Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
On Tue, Dec 29, 2020 at 4:22 PM RjOllos <rjollos@gmail.com> wrote:
>
> On Monday, December 28, 2020 at 11:17:41 PM UTC-8 Jun Omae wrote:
>>
>> On Tue, Dec 29, 2020 at 3:39 PM Ryan Ollos <rjo...@gmail.com> wrote:
>> >
>> > On Mon, Dec 28, 2020 at 9:50 PM Rob Hills <rcp....@gmail.com> wrote:
>> >>
>> >> Hi again Ryan,
>> >>
>> >> I am using mod_wsgi but because I am locked in to cPanel here, I have to use the one that cPanel permits in its framework. I gather cPanel uses the [https://www.phusionpassenger.com/docs/tutorials/what_is_passenger/ Phusion Passenger] App server. It was quite a process getting Trac to even work with this, I had to Google widely and knit together multiple tidbits of information! Unfortunately this means that lots of the nuts and bolts (like the Apache configuration) are hidden from the user.
>> >>
>> >> So, it's entirely possible I've mucked something up along the way to cause this issue.
>> >>
>> >> My Trac instance web root has the following structure (the symlinks were necessitated by Passenger!):
>> >>
>> >> cgi-bin folder
>> >> htdocs folder
>> >> public folder (symlink to htdocs)
>> >> passenger_wsgi.py (symlink to cgi-bin/trac.wsgi)
>> > ...
>> > But maybe Passenger would capture it in a log? Or you could open a file and output to a file?
>> >
>> > Ryan
>>
>> The issue has been reported at
>> https://github.com/phusion/passenger/issues/1828, however it is not
>> fixed yet.
>>
>
> Good find!
>
> Would it be a sufficient workaround to modify the environ dict?
>
> import urllib
> environ['PATH_INFO'] = urllib.unquote(environ['PATH_INFO'])

Yeah. I think that's enough to work around for the issue.


--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMahUYX3wcw09uBPoZE6XNxx8zvafuT%3DWnf3j2tqoN9PrXA%40mail.gmail.com.
Re: Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
Thank you Ryan and Jun! That workaround in my trac.wsgi has fixed the
problem. To close off the loop for others following, this is the change I
made to my trac.wsgi:

Original application(..) method:
def application(environ, start_request):
if not 'trac.env_parent_dir' in environ:
environ.setdefault('trac.env_path',
'/home/rhills/applications/trac/venv/trac_project')
if 'PYTHON_EGG_CACHE' in environ:
os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
elif 'trac.env_path' in environ:
os.environ['PYTHON_EGG_CACHE'] = \
os.path.join(environ['trac.env_path'], '.egg-cache')
elif 'trac.env_parent_dir' in environ:
os.environ['PYTHON_EGG_CACHE'] = \
os.path.join(environ['trac.env_parent_dir'], '.egg-cache')
from trac.web.main import dispatch_request
return dispatch_request(environ, start_request)

New (working) application(..) method:
def application(environ, start_request):

# By Rob Hills: Workaround for Passenger bug
(https://github.com/phusion/passenger/issues/1828) that means spaces in
URLs aren't properly decoded:
# see also https://groups.google.com/g/trac-users/c/Jm9JbiG5BJg for
detailed discussion
import urllib
environ['PATH_INFO'] = urllib.unquote(environ['PATH_INFO'])
# End workaround.

if not 'trac.env_parent_dir' in environ:
environ.setdefault('trac.env_path',
'/home/rhills/applications/trac/venv/trac_project')
if 'PYTHON_EGG_CACHE' in environ:
os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
elif 'trac.env_path' in environ:
os.environ['PYTHON_EGG_CACHE'] = \
os.path.join(environ['trac.env_path'], '.egg-cache')
elif 'trac.env_parent_dir' in environ:
os.environ['PYTHON_EGG_CACHE'] = \
os.path.join(environ['trac.env_parent_dir'], '.egg-cache')
from trac.web.main import dispatch_request
return dispatch_request(environ, start_request)


Many thanks again for all your help,

Rob Hills
Waikiki, Western Australia
On Tuesday, 29 December 2020 at 15:58:23 UTC+8 Jun Omae wrote:

> On Tue, Dec 29, 2020 at 4:22 PM RjOllos <rjo...@gmail.com> wrote:
> >
> > On Monday, December 28, 2020 at 11:17:41 PM UTC-8 Jun Omae wrote:
> >>
> >> On Tue, Dec 29, 2020 at 3:39 PM Ryan Ollos <rjo...@gmail.com> wrote:
> >> >
> >> > On Mon, Dec 28, 2020 at 9:50 PM Rob Hills <rcp....@gmail.com> wrote:
> >> >>
> >> >> Hi again Ryan,
> >> >>
> >> >> I am using mod_wsgi but because I am locked in to cPanel here, I
> have to use the one that cPanel permits in its framework. I gather cPanel
> uses the [
> https://www.phusionpassenger.com/docs/tutorials/what_is_passenger/
> Phusion Passenger] App server. It was quite a process getting Trac to even
> work with this, I had to Google widely and knit together multiple tidbits
> of information! Unfortunately this means that lots of the nuts and bolts
> (like the Apache configuration) are hidden from the user.
> >> >>
> >> >> So, it's entirely possible I've mucked something up along the way to
> cause this issue.
> >> >>
> >> >> My Trac instance web root has the following structure (the symlinks
> were necessitated by Passenger!):
> >> >>
> >> >> cgi-bin folder
> >> >> htdocs folder
> >> >> public folder (symlink to htdocs)
> >> >> passenger_wsgi.py (symlink to cgi-bin/trac.wsgi)
> >> > ...
> >> > But maybe Passenger would capture it in a log? Or you could open a
> file and output to a file?
> >> >
> >> > Ryan
> >>
> >> The issue has been reported at
> >> https://github.com/phusion/passenger/issues/1828, however it is not
> >> fixed yet.
> >>
> >
> > Good find!
> >
> > Would it be a sufficient workaround to modify the environ dict?
> >
> > import urllib
> > environ['PATH_INFO'] = urllib.unquote(environ['PATH_INFO'])
>
> Yeah. I think that's enough to work around for the issue.
>
>
> --
> Jun Omae <jun...@gmail.com> (?? ?)
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/ae0ad914-989a-4810-9f31-2ad5da78781fn%40googlegroups.com.
Re: Re: Trac 1.4.2 - doesn't handle spaces in Milestone names? [ In reply to ]
Ryan, the issue wasn't seen before upgrading because I had moved from one
server to another before upgrading. My previous server environment was
completely different, and much more Python-centric at the time. For the
record I was on a server run by Webfaction but since they have been bought
out their parent company announced they were withdrawing support for Python
with three months notice!

Cheers,
Rob Hills
Waikiki, Western Australia
On Tuesday, 29 December 2020 at 15:22:21 UTC+8 RjOllos wrote:

> On Monday, December 28, 2020 at 11:17:41 PM UTC-8 Jun Omae wrote:
>
>> On Tue, Dec 29, 2020 at 3:39 PM Ryan Ollos <rjo...@gmail.com> wrote:
>> >
>> > On Mon, Dec 28, 2020 at 9:50 PM Rob Hills <rcp....@gmail.com> wrote:
>> >>
>> >> Hi again Ryan,
>> >>
>> >> I am using mod_wsgi but because I am locked in to cPanel here, I have
>> to use the one that cPanel permits in its framework. I gather cPanel uses
>> the [https://www.phusionpassenger.com/docs/tutorials/what_is_passenger/
>> Phusion Passenger] App server. It was quite a process getting Trac to even
>> work with this, I had to Google widely and knit together multiple tidbits
>> of information! Unfortunately this means that lots of the nuts and bolts
>> (like the Apache configuration) are hidden from the user.
>> >>
>> >> So, it's entirely possible I've mucked something up along the way to
>> cause this issue.
>> >>
>> >> My Trac instance web root has the following structure (the symlinks
>> were necessitated by Passenger!):
>> >>
>> >> cgi-bin folder
>> >> htdocs folder
>> >> public folder (symlink to htdocs)
>> >> passenger_wsgi.py (symlink to cgi-bin/trac.wsgi)
>> > ...
>> > But maybe Passenger would capture it in a log? Or you could open a file
>> and output to a file?
>> >
>> > Ryan
>>
>> The issue has been reported at
>> https://github.com/phusion/passenger/issues/1828, however it is not
>> fixed yet.
>>
>>
> Good find!
>
> Would it be a sufficient workaround to modify the environ dict?
>
> import urllib
> environ['PATH_INFO'] = urllib.unquote(environ['PATH_INFO'])
>
> I wonder why the issue wasn't seen before upgrading from 0.12.x.
>
> 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/d712ceab-bd8d-40c4-adb3-b3e4430dd249n%40googlegroups.com.

1 2  View All