I'm using the "Add a read-more link if output is trimmed" and the [path] token in a multilingual site.
The read more link get a wrong url: http://localhost/drupal/it/it/Cappunnadda.
Note please the double "it" prefix in the outputted path.
It's a bug? If yes, there is a patch? I've searched in the issue queue for half an hour but I didn't find nothing

Comments

dawehner’s picture

Just a guess, try to setup a node: nid field and use node/[nid] as the path, though to tell you more it might help if you could provide an export of the view.

pietrocap’s picture

StatusFileSize
new25.15 KB

Thank you! Using node/[nid] as the path read-more link works fine.
Anyway I attach the exported "old" view, using token [path] .

kalbert036666@gmail.com’s picture

Title: token [path] , if "Add a read-more link if output is trimmed" is checked, produce a wrong url in the read more link » problem with readmore link
Version: 7.x-3.3 » 7.x-3.0
Component: User interface » Views Data
Assigned: Unassigned » kalbert036666@gmail.com
Category: bug » support
Priority: Normal » Critical

hey guys need help!!!
am using views in drupal 7, i have trimmed my content to 300 chars and also added a Content:Link to my fields.. and it works very well in the views preview but wen i get out of the view and reload my page my readmore link is not displayed but the content is trimmed yet in the view preview it works ...... wat cud be the problem..???? thanks in advance

stevenpatz’s picture

Title: problem with readmore link » token [path] , if "Add a read-more link if output is trimmed" is checked, produce a wrong url in the read more link
Version: 7.x-3.0 » 7.x-3.3
Component: Views Data » User interface
Assigned: kalbert036666@gmail.com » Unassigned
Category: support » bug
Priority: Critical » Normal

Open up a new issue, please

kalbert036666@gmail.com’s picture

make sure you have u add path to yo fields, also make sure that in your views content= to that in yo filter criteria u add content type which is equal to yo content type u are working with.i.e if u are working forms make sure yo content type = forms..

goldlilys’s picture

I have the same problem when a node title has symbols or apostrophes such as Dad's Car, the [path] it creates becomes http://example.com/dad%25E2%2580%2599s-car . And when I click on that link, it takes me to a page not found.

Using [nid] is not really a good solution because we don't want visitors to be linked to that kind of url. Is there another way to get the right link for trimmed results other than adding the [path] or [nid] token?

kalbert036666@gmail.com’s picture

u'v have to add the [path] field and then u have to check re-write output of that field in the options then add this
readmore.... hope that will help

chsanch’s picture

Hi, I solve this issue (I've a multilingual site also) doing this:
- Adding the "path" field to the view.
- Then check the "Use absolute link (begins with "http://")" in the rewrite results options
- To use this field in the replacement patterns, it needs to have a low weight to be one of the first fields showing up, this can be done with the rearrange option.
- With this you can use the [ path ] pattern directly and it'll show the right url alias for the multilingual site.

And that's it, I have the more link path working correctly. I think this is better than use the node/[nid] option, mostly because it'll use the clean url.

Hope this helps you.

64 questions’s picture

It did help me, chsanch. Great solution. The unwanted http://sitename/en//en/... links are gone now. Thanks.
To be complete in your instructions: In views -> configure field: content: path -> Check the checkbox: "Exclude from display".

sreehari.annam’s picture

hi. i have a basic page with large amount of content so that i want a "Read more" button after two or three paragraphs so that when ever user click on that button it will have to display all the content .
how can i achieve that, please tell me.

Valens rwakageyo’s picture

Title: token [path] , if "Add a read-more link if output is trimmed" is checked, produce a wrong url in the read more link » read more link

how to add read more link in node
pls somebody tell me

Valens rwakageyo’s picture

how can i add read more link in danland in preface region?

dspcore’s picture

To chsanch
Thanks for your good answer

colorado’s picture

Issue summary: View changes
StatusFileSize
new34.65 KB
new64.98 KB

To add a Read More link in a view, remember to add the field to the view and then move it above the field where you want to use it as a replacement pattern.

For example, if you want to create a Read More link in a truncated body in a block:

1) use Add in the drop-down menu for the view to add the [nid] == Content: Nid field to the view, and then

2) use Rearrange in the drop-down menu for the view and drag the Content: Nid field above the Body field.

3) Then you should see the Content: Nid as a Replacement pattern when you edit the Body field in the view.

See attached images in Comment #16 below.

colorado’s picture

colorado’s picture

StatusFileSize
new34.65 KB
new48.97 KB
new43.61 KB
new64.98 KB