In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Simple Details Jump to Notes ] Wiki ]  Related Changesets ] View Advanced ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0000454 [In-Portal CMS] Template System feature request always 2009-12-16 14:03 2010-07-22 15:06
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.1.0-B1
Status closed Product Version 5.0.1 Target Version 5.1.0
Time EstimateNo estimate
Summary 0000454: Customizable URL Endings for Mod-rewrite
Description Currently all mod-rewrite urls are ended with ".html". This is not quite
customizable. I propose to create a configuration variable e.g.
RewriteUrlEnding of dropdown type with such values: "" (empty), "/",
".html". To be more custom user could specify url ending for each url
individually using "url_ending" parameter of "m_Link" tag (e.g. <inp2:m_Link
template="path/to/template" url_ending="/"/>).

During parsing all possible rewrite url ending will be stripped from the end
of url before passing it to registered rewrite listeners. In case if
developer have specified it's own url ending (via "url_ending" parameter),
then of course it won't be stripped properly.
Additional Information
Tags No tags attached.
Reference http://groups.google.com/group/in-portal-dev/browse_thread/thread/2912746dce829220
Change Log Message Option to select default URL ending for Pages
Estimate Points 0
Attached Files patch file icon custom_url_ending.patch [^] (4,672 bytes) 2010-02-02 04:08 [Show Content]
patch file icon custom_url_ending_v2.patch [^] (5,170 bytes) 2010-04-25 12:33 [Show Content]
patch file icon custom_url_ending_v3.patch [^] (10,976 bytes) 2010-04-27 12:10 [Show Content]
patch file icon incorrect_configuration_value_separator_fix.patch [^] (3,081 bytes) 2010-05-02 05:29 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to 0000049closed (5.1.0)alex Merge ConfigurationAdmin and ConfigurationValues table 
related to 0000717closed (5.1.0)alex Add ability to display hint labels for configuration variables 
related to 0000548closed (5.1.0)alex Automatic mod-rewrite redirecting 

-  Notes
User avatar (0001448)
alex (manager)
2010-02-02 04:09

1. need to translate la_config_ModRewriteUrlEnding phrase
2. consider other, then ".html" as default ending
3. consider using "/" url ending for category links (via c_CategoryLink tag)
User avatar (0001452)
Dmitry (manager)
2010-02-02 16:46

NOTE

Once tested need to remember to convert this patch to use ConfigurationValues table ONLY completed in 0000049 Merge ConfigurationAdmin and ConfigurationValues table
User avatar (0001926)
Dmitry (manager)
2010-04-25 11:51

Patch can't be applied - please update.
User avatar (0001927)
alex (manager)
2010-04-25 12:34

Done. Please test.
User avatar (0001943)
Dmitry (manager)
2010-04-25 20:08

This has been tested good!

Additional question

I think it might make sense to send 404 when I am trying to access

http://www.jurmala.com/SVN/in-portal-5.1.x/in-bulletin/my_account/my_topics

via other URL ending (not the active one), example:

http://www.jurmala.com/SVN/in-portal-5.1.x/in-bulletin/my_account/my_topics.html
http://www.jurmala.com/SVN/in-portal-5.1.x/in-bulletin/my_account/my_topics/

The main reason why is that it can be considered a Duplication URLs.

Or even better do a 302 redirect to the correct URL.


Please comment.
User avatar (0001950)
alex (manager)
2010-04-26 04:53

What about case, when use uses "url_ending" parameter in "<inp2:m_Link" tag? If we do like you propose, then there is no need to such "url_ending" parameter, since it will never work because of proposed redirect.

For example if I want all category links to end up with "/", but all other links with ".html".
User avatar (0001956)
Dmitry (manager)
2010-04-26 07:49

Performing voting for this http://groups.google.com/group/in-portal-dev/browse_thread/thread/79fcf649bbd0768f
User avatar (0001980)
alex (manager)
2010-04-27 12:13

New option was added (off by default). New patch attached. Also 3 phrases were added:

Config Variable Name: Default URL Ending in SEO-friendly mode
Config Variable Name: Force Redirect to Selected URL Ending
Config Variable Hint: User will be automatically redirected to the selected Url Ending in case when current page url has a different ending

Also translation of phrase for "UseModRewrite" configuration variable was changed.

Please Test.
User avatar (0001986)
Dmitry (manager)
2010-04-27 16:22

Tested good!

Had to merge some things in http_query.php, but it worked well.
User avatar (0002009)
alex (manager)
2010-04-28 06:29

Fix committed to 5.1.x branch. Commit Message:

Fixes 0000454: Customizable URL Endings for Mod-rewrite
User avatar (0002039)
Dmitry (manager)
2010-05-01 20:44
edited on: 2010-05-01 20:49

There are 2 little bugs:

1. in Install_data.sql. Please adjust , to || for ConfigurationValues

http://source.in-portal.org/in-portal/branches/5.1.x/core/install/install_data.sql?r1=13453&r2=13454&pathrev=13454


2. when I select Force URL End Redirect and I enter the website:

http://www.jurmala.com/SVN/in-portal-5.1.x (or http://www.jurmala.com/SVN/in-portal-5.1.x/)

I get redirected to:

http://www.jurmala.com/SVN/in-portal-5.1.x/index/

This should NOT happen for Index page I think, at least we should not add "index".

User avatar (0002042)
alex (manager)
2010-05-02 05:32

1. done in "incorrect_configuration_value_separator_fix.patch" (already commited) patch. Please test.

2. Was part of 0000548 task specs. All questions should be addressed to it.
User avatar (0002045)
Dmitry (manager)
2010-05-02 11:13

Reviewed, please commit.
User avatar (0002535)
alex (manager)
2010-07-22 15:06

Closing, since 5.1.0 release has been released.

- Related Changesets
In-Portal CMS: 5.1.x r13476
Timestamp: 2010-05-02 05:30:39
Author: alex
Details ] Diff ]
1. Bug 0000454: Customizable URL Endings for Mod-rewrite
2. Fixes incorrect value separator in "url endings" configuration variable
mod - /in-portal/branches/5.1.x/core/install/install_data.sql Diff ] File ]
mod - /in-portal/branches/5.1.x/core/install/upgrades.sql Diff ] File ]
In-Portal CMS: 5.1.x r13454
Timestamp: 2010-04-28 06:29:44
Author: alex
Details ] Diff ]
Fixes 0000454: Customizable URL Endings for Mod-rewrite
mod - /in-portal/branches/5.1.x/core/install/english.lang Diff ] File ]
mod - /in-portal/branches/5.1.x/core/install/install_data.sql Diff ] File ]
mod - /in-portal/branches/5.1.x/core/install/upgrades.sql Diff ] File ]
mod - /in-portal/branches/5.1.x/core/kernel/application.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/kernel/utility/http_query.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/kernel/utility/unit_config_reader.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/units/helpers/mod_rewrite_helper.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2010-07-22 15:06 alex Note Added: 0002535
2010-07-22 15:06 alex Status resolved => closed
2010-05-02 11:25 alex Reference Google Groups http://groups.google.com/group/in-portal-dev/browse_thread/thread/2912746dce829220 => http://groups.google.com/group/in-portal-dev/browse_thread/thread/2912746dce829220
2010-05-02 11:25 alex Status reviewed and tested => resolved
2010-05-02 11:25 alex Resolution reopened => fixed
2010-05-02 11:14 Dmitry Change Log Message Options to select default Page URL ending => Option to select default URL ending for Pages
2010-05-02 11:13 Dmitry Note Added: 0002045
2010-05-02 11:13 Dmitry Assigned To !COMMUNITY => alex
2010-05-02 11:13 Dmitry Status needs testing => reviewed and tested
2010-05-02 05:33 alex Relationship added related to 0000548
2010-05-02 05:32 alex Note Added: 0002042
2010-05-02 05:32 alex Assigned To alex => !COMMUNITY
2010-05-02 05:32 alex Status needs feedback => needs testing
2010-05-02 05:30 alex Changeset attached 5.1.x r13476
2010-05-02 05:29 alex File Added: incorrect_configuration_value_separator_fix.patch
2010-05-01 20:49 Dmitry Note Edited: 0002039 View Revisions
2010-05-01 20:44 Dmitry Note Added: 0002039
2010-05-01 20:44 Dmitry Status resolved => needs feedback
2010-05-01 20:44 Dmitry Resolution fixed => reopened
2010-04-28 06:29 alex Note Added: 0002009
2010-04-28 06:29 alex Status reviewed and tested => resolved
2010-04-28 06:29 alex Fixed in Version => 5.1.0-B1
2010-04-28 06:29 alex Resolution open => fixed
2010-04-28 06:29 alex Assigned To !COMMUNITY => alex
2010-04-28 06:29 alex Changeset attached 5.1.x r13454
2010-04-27 16:30 Dmitry Change Log Message Options to select Page URL ending => Options to select default Page URL ending
2010-04-27 16:30 Dmitry Change Log Message New functionality allowing to select Page URL ending => Options to select Page URL ending
2010-04-27 16:29 Dmitry Change Log Message => New functionality allowing to select Page URL ending
2010-04-27 16:22 Dmitry Note Added: 0001986
2010-04-27 16:22 Dmitry Status needs testing => reviewed and tested
2010-04-27 12:13 alex Note Added: 0001980
2010-04-27 12:13 alex Assigned To alex => !COMMUNITY
2010-04-27 12:13 alex Status needs work => needs testing
2010-04-27 12:10 alex File Added: custom_url_ending_v3.patch
2010-04-27 09:34 alex Relationship added related to 0000717
2010-04-26 07:49 Dmitry Assigned To Dmitry => alex
2010-04-26 07:49 Dmitry Status needs feedback => needs work
2010-04-26 07:49 Dmitry Note Added: 0001956
2010-04-26 04:53 alex Assigned To alex => Dmitry
2010-04-26 04:53 alex Note Added: 0001950
2010-04-25 20:08 Dmitry Note Added: 0001943
2010-04-25 20:08 Dmitry Assigned To !COMMUNITY => alex
2010-04-25 20:08 Dmitry Status needs testing => needs feedback
2010-04-25 12:34 alex Note Added: 0001927
2010-04-25 12:34 alex Assigned To alex => !COMMUNITY
2010-04-25 12:34 alex Status needs work => needs testing
2010-04-25 12:33 alex File Added: custom_url_ending_v2.patch
2010-04-25 11:51 Dmitry Note Added: 0001926
2010-04-25 11:51 Dmitry Assigned To !COMMUNITY => alex
2010-04-25 11:51 Dmitry Status needs testing => needs work
2010-02-27 04:21 alex Developer => alex
2010-02-02 16:46 Dmitry Relationship added related to 0000049
2010-02-02 16:46 Dmitry Note Added: 0001452
2010-02-02 04:09 alex Time Estimate Removed 3 =>
2010-02-02 04:09 alex Note Added: 0001448
2010-02-02 04:09 alex Assigned To => !COMMUNITY
2010-02-02 04:09 alex Status active => needs testing
2010-02-02 04:08 alex File Added: custom_url_ending.patch
2010-01-12 11:12 alex Time Estimate Added 3
2010-01-12 10:40 alex Target Version Icebox => 5.1.0
2009-12-16 14:04 Dmitry Reporter Dmitry => alex
2009-12-16 14:03 Dmitry Type bug report => feature request
2009-12-16 14:03 Dmitry New Issue
2009-12-16 14:03 Dmitry Reference => Google Groups http://groups.google.com/group/in-portal-dev/browse_thread/thread/2912746dce829220



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker