AnsweredAssumed Answered

Viewing pdf via CWP stopped working

Question asked by RPaulH on Aug 21, 2018
Latest reply on Aug 22, 2018 by mdenyse

On one of our websites we have a button that views a pdf within a container in a new browser tab. It had been working fine, but in the last few months no one had used the site much and last week we found out that we are now receiving a "File Not Found" error when clicking the button that should view the pdf. Below is the code for the first container. ReportDocument1 is the container

ReportFileName1 is the calculation "GetContainerAttribute( ReportDocument1; "filename")", Unstored, Text

 

<?php

$docName1 = $record->getField('ReportFileName1');

$reportDoc1 = $record->getField('ReportDocument1'); ?>

   1<a margin="left:10px" href="<?php echo $reportDoc1 ?>" target="_new"><button class="editcontactLeft">Load PDF</button></a>

<?php echo str_replace("?", "", $docName1); ?><br/>

 

I learned what I know about php while building this site so this type of problem is a challenge. I've checked my layout to make sure nothing has been altered and the fields are all there. I can paste the loaded page source code related to the above php code if that would help?

Outcomes