Problem/Motivation

According to the help text when placing a block on specific pages /user would place a block on the current user's page, but the block does not show up there.
Placing it on/user/* for every user page does work.

If the help text is wrong and the path isn't in fact /user then the help text that gives this example needs changing because it's the only place where users find out how to place a block on a user page.

Alternatively it's is a bug.
The current user's page is not actually /user but something like /user/123, but a logged in user is directed to their own user page when they type that in.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ifrik created an issue. See original summary.

tim.plunkett’s picture

Issue tags: +Novice

I would just remove the part about /user from \Drupal\system\Plugin\Condition\RequestPath::buildConfigurationForm(), it is misleading.

dishabhadra’s picture

Status: Active » Needs review
FileSize
1.07 KB

I think help text which is provided we need to change that because the current user's page is not actually /user but something like /user/123.

Adding patch to changing the description.

Let me know this approach is fine.

mathieso’s picture

Downloaded the patch, ran it. The wording matches the need:

Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. Example paths is /user/* for every user page. <front> is the front page.

One change: perhaps "Example paths is" should be "An example path is".

mathieso’s picture

I'll create a patch to make the change.

mathieso’s picture

Issue tags: +MWDS2016
mathieso’s picture

Changes this from#3:

Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. Example paths is /user/* for every user page. is the front page.

Changed "Example paths is" to "An example path is"

...to...

Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. An example path is /user/* for every user page. <front> is the front page.

Status: Needs review » Needs work

The last submitted patch, 7: placing_blocks_on-2785657-6.patch, failed testing.

mathieso’s picture

FileSize
1.01 KB

Sorry, messed up the interdiff in #7.

mathieso’s picture

Sorry, #7 patch failed because I made it from modules/, rather than /core/modules.

Trying again.

mathieso’s picture

Status: Needs work » Needs review
YesCT’s picture

Status: Needs review » Reviewed & tested by the community

Looked at the patch, does the recommended solution of taking out the /user example, and fixes the grammar cause it's just one example in that sentence.

No coding standard problems.

:)

alexpott’s picture

Status: Reviewed & tested by the community » Needs review

Is this fixing this the right way - I think I would have expected /user to work - it obviously did at some point otherwise why would the text exist?

dawehner’s picture

D7 used to work like that ... you /user pointing both to the current user page, as well as login page for the anonymous user. This got changed at some point in the early D8 cycle, before the user.routing.yml file existed.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

I hope this answers @alexpott's question.

catch’s picture

Title: Placing blocks on current user's page does not work » Misleading text in block visibility pages description

Re-titling.

  • catch committed 09b65db on 8.3.x
    Issue #2785657 by mathieso, dishabhadra, ifrik, dawehner, YesCT, tim....

  • catch committed 26f74d7 on 8.2.x
    Issue #2785657 by mathieso, dishabhadra, ifrik, dawehner, YesCT, tim....
catch’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +String change in 8.2.0

Since this is a bug in the description test, committed/pushed to both 8.3.x and 8.2.x. Tagging as a string change so it shows up in the release notes.

ifrik’s picture

Thanks for changing the wording.

I've opened a new issue to fix the regression that placing blocks on the current user's page is not possible anymore in D8 #2806541: Regression: Blocks cannot be placed on current user's page.

Status: Fixed » Closed (fixed)

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