Skip Navigation

[Resolved] View of uploaded document not working anymore

This thread is resolved. Here is a description of the problem and solution.

Issue was fixed by using alternate quote marks for short code attributes, while nesting short code in another short code or HTML attribute.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 8.52 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by stefanB-2 6 years, 1 month ago.

Assigned support staff: Waqas.

Author
Posts
#320469

I do have several Cust Fields of the type "File Field". Now I would like to display the content of this field.

I have used in the past the following construction for this:

<iframe src="[types field="procedure-docs" link="true" output="raw"][/types]" width="100%" height="900" frameborder="0"></iframe>

Maybe due to the latest 4.2.3. WP automatic Update - this is no longer working.

Now I have tried to get a link in place that can be opened on a new tab/window by applying the following:

<a href="[types field="procedure-docs" url="true" title="Procedure beschrijving"][/types]" target="_blank">Procedure Doc</a>

But it seems that the short code is not translated properly: "...../[types%20field=".

I have applied the latest beta release from Views and Types to my environment.

#320473

In addition to the first message ....

I want to have a link to the uploaded File and when I click on the link, I would like to show the File in a new window/tab

[types field="procedure-docs" link="true" target="_blank" title="Link Procedure document"][/types]

is working fine a a link, but it is not opening on a new window/tab. I have tried to add target="_blank", but that seems to be not working.

#320519

In addition to my earlier posts, I just found out that the following:

<iframe src="[types field="procedure-docs" link="true" output="raw"][/types]" width="100%" height="900" frameborder="0"></iframe> 

is working fine within a CREDform but is not working as part of content template.

What is necessary to make this working within a View/Content Template?

#320531

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Please consider followings regarding your queries.

1) For the iframe issue, please use alternate quotes when embedding Views/Types short codes in an HTML code. Please notice single quotes used for Types short code attributes, while short code itself is surrounded by double quotes.

<iframe src="[types field='procedure-docs' link='true' output='raw'][/types]" width="100%" height="900" frameborder="0"></iframe>

Or upgrading to latest views beta may help.

2) To open link in a new tab:

<a href="[types field='procedure-docs' link='true' output='raw'][/types]" target="_blank"  title="Link Procedure document">
    [types field='procedure-docs' link='true' output='raw'][/types]
</a>

Please notice the way the short code is used with <a> tag.

#320547

Thanks - I have applied the code with the right quotes and it is indeed working.
It is working when I use the code stand-alone.

It is not working when I use the code in combination with WP-CANVAS in order to get some tabs on my page displayed. This was working fine - but since this weekend not anymore.

I have installed the latest version (today) of the WP-CANVAS and even the beta versions of Type/Views.

Any idea why Views and WP-CANVAS are not working fine anymore as it was last week?

#320810

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Can you please share the code you are using to combine with WP-Canvas for tabs?

Also, can you please provide some debug information about your site? Please see https://toolset.com/faq/provide-debug-information-faster-support/ for more information.

I have enabled debug information area for your next reply.

#320988
View -With Tabs.png
View-No Tabs.png

Here is the code that I'm using. Without the tabs, I'm getting all existing documents displayed. Same code with the tabs are given a page including the message page not found - see the attachment.

[wc_tabgroup layout="box"]

[wc_tab title="First Tab"]

<h3>Procedure document</h3>
[wpv-if url="wpcf-procedure-docs" evaluate="!empty($url)"]
<iframe src="[types field="procedure-docs" link="true" output="raw"][/types]" width="100%" height="900" frameborder="0"></iframe>
[/wpv-if]

[/wc_tab]

[wc_tab title="Second Tab"]

<h3>TC Plan </h3>
[wpv-if url="wpcf-tc-plan-document" evaluate="!empty($url)"]
<iframe src="[types field="tc-plan-document" link="true" output="raw"][/types]" width="100%" height="900" frameborder="0"></iframe>
[/wpv-if]

[/wc_tab]

[/wc_tabgroup]

In case you want to have access to the site, you can use the private details from reply #314539 wrt Paramteric Research and the following link ..../opdrachten/140627001-stefanbauer-ho-done-id791/

#321215

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Your code looks fine, except those alternate quotes are not used. As a first suspect you should use single quotes for [types] short code attributes, when short code itself is surrounded by double quotes (i.e. as used in iframe tag above).

However, you mentioned a page not found issue, that shouldn't be related to this, but due to another problem.

Can I ask for a temporary access to your site? So I can look for more details. I tried guessing the URL you provided for access in previous message, but that didn't work.

I have enabled your next reply as private, please input all details in that area. Please mention the links to the pages, views, forms, CPTs and configurations in question.

Please take a backup of your site, before proceeding.