Forum

Thread tagged as: Question, Docs

Adding Doc link from a page

I want to be able to add doc links to documents I have uploaded to my assets from pages in my site.

When I am in a blog post and I add a photo, I can see all the photos in my assets folder.

When I am in a page with a perch content tag and I try to add a doc link from content section, the Select an Asset pops up, but it is blank - none of my assets are showing. I can see I have got assets in the Assets section, and if I try to add an asset, it says it is uploading, but doesnt turn up in the pop up (it is there when i view the assets directly).

Is this right? Shouldnt I be able to see my assets from the pages as well as the blog posts? I thought I used to be able to do this, but its been a while and I have done several Perch upgrades recently which may have changed things. ~~~

Perch: 3.0.10, PHP: 5.6.3, MySQL: 5.5.40, with PDO Server OS: Linux, apache2handler Installed apps: content (3.0.10), assets (3.0.10), categories (3.0.10), perch_blog (5.6.1), perch_events (1.9.5), perch_gallery (2.8.9) App runtimes: <?php $apps_list = array( 'perch_blog', 'perch_events', 'perch_gallery', ); PERCH_LOGINPATH: /perch PERCH_PATH: /home/cfpc/chiddingfoldfarmers.com/htdocs/perch PERCH_CORE: /home/cfpc/chiddingfoldfarmers.com/htdocs/perch/core PERCH_RESFILEPATH: /home/cfpc/chiddingfoldfarmers.com/htdocs/perch/resources Image manipulation: GD PHP limits: Max upload 100M, Max POST 100M, Memory: 128M, Total max file upload: 100M F1: 3b606135b33e6a102526838f4152a807 Resource folder writeable: Yes HTTP_HOST: www.chiddingfoldfarmers.com DOCUMENT_ROOT: /home/cfpc/chiddingfoldfarmers.com/htdocs REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

cow shed

cow shed 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What do you mean by doc link?

When I am editing a content area on a page I can choose to add a document to the text. This is what I mean by doc link. I click on the doc symbol above the editing box and it takes me to a pop up that says select an asset. This pop up doesnt show any assets, even though I do have assets on the site. I can see the assets if I go into Assets directly.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have a bucket selected?

Ah no I didn’t have a bucket selected and when I do I am able to add my document to a content section of a page.

However when I try to do exactly the same on an event listing it doesn’t work.

[cms:asset 818] gets added on both the page and the event - on the page it replaces [cms:asset 818] with the actual document name and it links through.

However on the event page is still shows as [cms:asset 818]

Do you know what I can do to add a document to an event listing?

Drew McLellan

Drew McLellan 2638 points
Perch Support

What's the difference between the two implementations?

This is how it adds to the event https://www.chiddingfoldfarmers.com/pages-cfpc/event.php?s=2017-07-28-last-day-of-senior-camp

(Nb as it doesn’t work I have added it to an old event)

This is how it adds to a page (it is the prize giving link at the bottom - this works fine)

https://www.chiddingfoldfarmers.com/pages-cfpc/camps-senior.php

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you using the Events app?

Yes I am

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, that's what I meant when I asked what the difference was. One is presumably a content region, and the other is a listing from the Events app. Two very different things.

Assets should work with Events, but if you show me what you're doing I can test it out.

Ideally I would post some screen shots but in summary what I'm doing is :

I go into an existing event and click into the Description box.

I click on the Document icon above the box. This brings up the Select an Asset box.

I choose By Bucket and click on Default. I can now see the document I want to link

I click on the document and choose Use Selected

[cms:asset 812] is added into the Description box.

I save the event and view it on the website.

I see [cms:asset 812] on the webpage https://www.chiddingfoldfarmers.com/pages-cfpc/event.php?s=2017-12-16-christmas-supper-prize-giving

Hope this is enough to let you recreate it? Let me know if you want some screen shots of what I'm doing.

Hi Drew Just checking if you have any ideas on what could be causing the problems with adding documents to the events in the events module? I have left the example up on the website for you to see - but it looks pretty bad so I'd like to take it down once you have seen the problem (as per post above) Many thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

You don't need to leave the example up - you can remove it.

Hi

As well as having a problem adding a link to a document from within an event, I am also having a problem adding a link from within a text area region in a normal page content area. I will post a different problem as they may be different.

Hopefully you will have an answer to the event problem soon?

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you have other problems you should post a new thread for each.

Yes if I hadnt fixed it I would have done. As above its just the original problem that I believe you are working on that is outstanding - the one where I cant add a link to a document from an event

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, that's logged.

As well as the problem adding a document link to an event, I also cant add a link to a url from an event

When I use the link button the popups take me through adding the url and the link text and I get this :

The cost is £18 each, you can book "here":https://branches.pcuk.org/chiddingfold_farmers/online-entries/

I have to replace " " with [ ] and replace : with ( ) manually to make it work :

The cost is £18 each, you can book here

NB What I have typed above is not showing up here - only the actual output so I'm not sure how to show you what I'm typing - if you can edit this post you will see the code! I have changed "here" to [here] and :https://branches.pcuk.org/chiddingfold_farmers/online-entries/ to (https://branches.pcuk.org/chiddingfold_farmers/online-entries/)

Is that something that can be fixed with the document link issue?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It looks like you're using Markdown, not Textile.

Yes. Is this a problem?

<perch:events id="eventDescHTML" type="textarea" markdown="true" editor="markitup" encode="false" />