3

I've got a strange issue with some Coldfusion/SQL Query output. The actual data is generating properly, but at the bottom of the page it's outputting "Library/Library/Library/Library/Library/Library/Library/Library" for no reason I can discern.

It always outputs it in exactly that format, always 8 times, no matter how many terms I'm searching for, how many records are returned, or how much text is generated after grouping.

It doesn't happen on all pages, but it does seem to happen on every page on the site that pulls a query from this database...

I'm lost. Code below, live page is here: http://www.audiogo-library.com/client/client_pages/hachettepage.cfm

<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
<!--- Custom Hachette page ---> 
<cfset todayDate = Now()>
<!--- Link to Style Sheets --->


<img style="margin:auto" src="http://www.audiogo-library.com/Library/client/client_images/hachettelogo.gif"></br>
<cfoutput>  #MonthAsString(Month(Now()))# </cfoutput> Releases</br></br>
<cfquery name="GetProductBasicInfo" datasource="#Request.Application.PowerWeb.datasource#" dbtype="odbc">
    SELECT product.ProductID, productmarket.imprint, product.IsbnUpc, product.Title, product.FullTitle, product.SubTitle, product.PubDate, product.SKU, productmarket.descriptionshort, productmarket.productform, productmarket.NoOfPieces, productmarket.productmarketid
    FROM Product, ProductMarket
    WHERE product.productid = productmarket.productid AND product.IsbnUpc LIKE '%61113%' AND product.PubDate BETWEEN '<cfoutput>#DatePart("m", todayDate)#</cfoutput>/01/<cfoutput>#DatePart("yyyy", todayDate)#</cfoutput>' AND '<cfoutput>#DatePart("m", todayDate)#</cfoutput>/31/<cfoutput>#DatePart("yyyy", todayDate)#</cfoutput>'    
    ORDER BY product.FullTitle ASC
</cfquery> 

<cfoutput query="GetProductBasicInfo" Group="FullTitle">
<table width="90%" border="0" style="margin-top:15px;">
  <tr>
    <td><p><a href="http://www.audiogo-library.com/library/productdetails.cfm?sku=#SKU#"> 
            <cfif #FullTitle# eq ''> <div class="title"> #Title# </div> 
                <cfelse> <div class="title">#FullTitle# </div> </a> 
            </cfif></p>
            <p>
            <cfif #descriptionshort# neq ''> #descriptionshort# </cfif>
            </p>
    </td>
    <td width="30%"><a href="http://www.audiogo-library.com/library/productdetails.cfm?sku=#SKU#"> <img src="http://www.audiogo-library.com/library/client/Products/ProdimageLg/#SKU#.jpg"></a></td>
  </tr>
</table>
</cfoutput>

TestText
EepMoody
  • 124
  • 10
  • 1
    I actually solved it by accident while trying to push the "/Library"s down the page. It turns out the cfsettings tag built into the query/output was disabling non cfoutput content. THe guy who built the footer was relying on inheriting "enablecfoutputonly='false'", and this code changed that. Everything from the site's footer was being hidden except for the section of each address that was generated by cfoutput. SO yeah, if anyone else has this or a similar problem, check your cfsettings tag, and ensure you DISABLE "enablecfoutputonly" at the end of your output. – EepMoody Mar 13 '12 at 18:42
  • 3
    You might be better off using `` around your blocks of code rather than using ``. CF will force you to turn off `` while it won't do anything with the `` tag. Just a suggestion. – David Faber Mar 13 '12 at 21:16
  • Thanks for that, David! Definitely will begin rewriting the existing code to take advantage of that cleaner tag. Most of these errors were already here, written by the previous web designer, I'm just trying to clean them up and make them work correctly... – EepMoody Mar 20 '12 at 14:09

2 Answers2

0

I actually solved it by accident while trying to push the "/Library"s down the page. It turns out the cfsettings tag built into the query/output was disabling non cfoutput content. THe guy who built the footer was relying on inheriting "enablecfoutputonly='false'", and this code changed that. Everything from the site's footer was being hidden except for the section of each address that was generated by cfoutput. SO yeah, if anyone else has this or a similar problem, check your cfsettings tag, and ensure you DISABLE

EepMoody
  • 124
  • 10
-1

Go to cfadmin and disable query caching. Restart the CF service. Voila!...no more extra data.

Aman Kejriwal
  • 521
  • 1
  • 7
  • 28