Context Request Path is a Drupal 7 module that extends the context module.
It makes you able to match a context on the request path, in stead on the normal internal request path.
This could be of good use when you have views with paths that renders urls like:

node/%/managers

Normally, drupal would give you node/[nid]/managers, but with subpath auto, you get [alias]/managers.
The normal context path won't match that URL.

This module is different from context_url as it extends the normal context_condition_path and only works on the request path, not the domain.

Project: http://drupal.org/sandbox/jeroen.b/1475236
Git: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/jeroen.b/1475236.git context_request_path

Comments

patrickd’s picture

Status: Needs review » Needs work

welcome,

It seems to me that we have a very similar module in the queue: https://drupal.org/node/1468596
Can you have a look and explain what differences there are?

Anyway,

You are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.

while waiting for an in-depht review of your module you can start out fixing some coding style issues detected by automated tools:
http://ventral.org/pareview/httpgitdrupalorgsandboxjeroenb1475236git

You can also get a review bonus and we will come back to your application sooner.

regards

jeroen.b’s picture

Thank you Patrick,

I fixed the styling issues, and added a README.txt.
I also made the 7.x-1.x branch, and removed the files from the master branch.

My module works more like the original context path condition which matches the internal path.
It has the same method of matching and is easier to use because of that, it also inherits from the original context path condition.

My module uses the request_path(), which makes it only match on the Drupal path, the other module matches on the full domain and request path.

In short: my domain is simpler and easier to use, as you don't have to mess with odd patterns, it's also more fail-proof as it does not use the domain/basedir for matching.

patrickd’s picture

hmm, I'm still not sure about that
If you think the other module does the same thing but worse, wouldn't it be better to join forces ?

jeroen.b’s picture

It rather seems to have another goal, matching on the full url, including the hostname.

jeroen.b’s picture

Status: Needs work » Needs review
luxpaparazzi’s picture

Status: Needs review » Needs work

1. I think you should answer in more deteail to the question of patrickd, and insert those comments into the project application.

2. You should truncate the REAMDE.txt to 80characters, as stated already.

3. "Normal Drupal module installation" => "Standard module installation" would pe better imo

4. "It works mostly the same as Context Path(it inherits of it)" => Non developers have no idea of what inheriting means!

5.

README.txt
Please take a moment to make your README.txt follow the guidelines for in-project documentation.

6.

project page
Please take a moment to make your project page follow tips for a great project page.

7.

Code too short
This project is too short to approve you as git vetted user. We are currently discussing how much code we need, but everything with less than 120 lines of code or less than 5 functions cannot be seriously reviewed. However, we can promote this single project manually to a full project.

8. You should remove " from the .info file

luxpaparazzi’s picture

The response time for a review is now approaching 4 weeks.
Get a review bonus and we will come back to your application sooner.
See: http://drupal.org/node/1410826

You could for example start by evaluating my own project:
http://drupal.org/node/1302786

klausi’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

mxt’s picture

Status: Closed (won't fix) » Active

I think this project should be reconsidered: it does its job and does it very well.

I used it to resolve issues with subpathauto and context (see: http://drupal.org/node/1944142 )

I've checked both modules (this one and context_url) and they are definitively different in this way:

  1. Context Request Path checks only the final part (e.g. /category/page) while Context_url (by design) checks the full url, domain included (e.g. www.mysite.com/category/page/). This last approach has the disadvantage that you have to pay attention in deployment management between different enviroments: the full url to check may change e.g. dev.mysite.com -> stage.mysite.com -> www.mysite.com so you have to change the context conditions for every environment).
  2. Context Request Path is a clean and simple class extension of the existing default (and full tested) context_condition_path while Context_url recreates its own logic to check the conditions (this actually causes some bugs described in point 3 of my http://drupal.org/node/1468596#comment-7190590 comment).
  3. At the moment Context Request Path is the only that can be considered "finished", while Context_url still have some issues with multivalue path conditions and the finale release is not ready due to some difficulties with GIT.

Hope to see this module released in a full project soon.

Thank you very much

klausi’s picture

Status: Active » Needs work

Needs a maintainer response.

jeroen.b’s picture

I will try to fix most of the things in #6

jeroen.b’s picture

Issue summary: View changes

Some more information

jeroen.b’s picture

Status: Needs work » Needs review

I updated code, this issue and the project page to address issues from #6

DebtConsolidationCare’s picture

Status: Needs review » Needs work

Hi,
There are some minor error found as per coding standard. Please check this link http://ventral.org/pareview/httpgitdrupalorgsandboxjeroenb1475236git-7x-1x

klausi’s picture

Status: Needs work » Needs review

Minor coding standard issues are not application blockers, please provide a manual review.

jeroen.b’s picture

pranit84’s picture

Title: Context Request Path » [D7] Context Request Path

Title modified to show the Drupal version.

kscheirer’s picture

Assigned: Unassigned » kscheirer
kscheirer’s picture

Assigned: kscheirer » Unassigned
Status: Needs review » Reviewed & tested by the community

Seems pretty simple - code review comes back clean and it's different enough from Context's path (which does not support aliases) and Context_url's path handling (which works on the entire domain).

jeroen.b’s picture

What's next?

kscheirer’s picture

No further action is required, but the best thing you can do is get a Review Bonus by reviewing other applications. That will get you to the top of the list of projects to get reviewed (and hopefully approved).

----
Top Shelf Modules - Enterprise modules from the community for the community.

kscheirer’s picture

Status: Reviewed & tested by the community » Fixed

it's been over a month, and the module still looks good on a second pass. This issue has been waiting quite some time, thanks for sticking with it!

Thanks for your contribution, jeroen.b!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

----
Top Shelf Modules - Enterprise modules from the community for the community.

mxt’s picture

What a good news!!!

Thank you guys for all your work and for releasing this useful module as a full project!!!

mxt’s picture

@jeroen.b would you please release this as a full project now that you are able to do it!

jeroen.b’s picture

@MXT done :)

Thanks to all the reviewers!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated clone URL