Forum

Thread tagged as: Problem, Error

List and detail Single item URL incorrect from Editors panel

I have a list and detail page Single item URL that was working and is now stopped.

Link in the Editors panel set as dress-{slug} did point to ../dress-dress-lucille whese now it points to ../cms/core/apps/content/edit/dress-lucille

RewriteRule ^dress-([^/]*)$ /detail.php?s=$1 [L]

Any ideas why it might have stopped working?

Another part of the site using a similar template is working correctly.

David Owen

David Owen 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What's your Site URL set to on the Settings page?

it's set as a backslash /

note another list and details single item URL on the same site is working perfectly

And weirdly the search result are showing the correct URL using dress-{slug}

If similar template is working elsewhere then perhaps it's this list detail template has an issue?

<h1><perch:content id="title" type="text" label="Dress Name" required="true" title="true" help="Make sure this name is unique!" /></h1>

<div class="bridespicblock">
    <div class="bridespic"> 
        <img src="<perch:content id="image" type="image" label="Main Product Image" width="640" bucket="dresses" help="Add a primary image to display at the top of this product page" /> "alt="<perch:content id="imgalt" type="text" label="Alt text" />" class="BrideImgBig" /><img src="<perch:content id="image2" type="image" label="Image Two" width="310" height="310" crop="true bucket="dresses" divider-before="Optional extra Images" />" alt="<perch:content id="imgalt2" type="text" label="Alt text" />" class="BrideImg2" /><img src="<perch:content id="image3" type="image" label="Image Three" width="310" height="310" crop="true" bucket="dresses" />" alt="<perch:content id="imgalt3" type="text" label="Alt text" />" class="BrideImg3" />
    </div>
    <div class="bridecaption">
        <p><perch:content id="caption" type="textarea" label="Image caption" size="xs" help="Say something nice to summarise these images - limited to 40 words" words="40" /><p>
    </div>
</div>

<div class="bridestory">

<perch:content id="desc" type="textarea" label="Description" textile="true" editor="markitup" imagewidth="640" imageheight="480" size="m" divider-before="Page Text Section" />

<hr>
<ul class="speclist">
    <li><p class="spec"><span class="specname">Silhouette: </span><perch:content id="Silhouette" type="text" label="Silhouette" size="xl" divider-before="Specifications" /></p></li>
    <li><p class="spec"><span class="specname">Neckline: </span><perch:content id="Neckline" type="text" label="Neckline" size="xl" /></p></li>
    <li><p class="spec"><span class="specname">Style: </span><perch:content id="Style" type="text" label="Style" size="xl" /></p></li>
    <li><p class="spec"><span class="specname">Fabric: </span><perch:content id="Fabric" type="text" label="Fabric"  size="xl" /></p></li>
    <li><p class="spec"><span class="specname">Colour: </span><perch:content id="Colour" type="text" label="Colour"  size="xl" /></p></li>
    <li><p class="spec"><span class="specname">Size: </span><perch:content id="Size" type="text" label="Size"  size="xl" /></p></li>
    <li><p class="spec"><span class="specname">Options: </span><perch:content id="Options" type="text" label="Optional Extras"  size="xl" /></p></li>
</ul>


<perch:if exists="price">
<hr>
<p class="price">Price: £<perch:content id="price" type="text" label="Offer Price" format="#:2" help="Display an optional price." size="s"  divider-before="Price and Equire Button" /></p>
<hr>
<perch:else />
<hr>
<p class="price">Price: £ P.O.A.</p>
<hr>
</perch:if>


<perch:if exists="showbutton">
    <form action="contact.php" method="post">

        <p class="smalltxt"><perch:content id="showbutton" type="checkbox" label="Show Button" value="Enquire about this product" help="Tick this if you want an enquire button to take information to the contact form" /></p>
        <input type=hidden name="stock" value="<perch:content id="title" type="text" label="Product title" />">
    <input id="sendbutton" class="SndBtn" type="submit" name="Send" value="Enquire →">
        <hr>
    </form>
</perch:if>




<perch:content id="slug" for="title" type="slug" suppress="true" />
<perch:content id="image" type="image" label="Thumbnail Image" width="300" height="468" crop="true" suppress="true" help="Add a Thumbnail image for the product list" />





<perch:categories id="Work" label="Product Type" set="collections" display-as="checkboxes" help="Select which collection this dress should be in" divider-before="Categories">

<perch:before>
    <h3>Collection</h3>
    <ul class="prodcats">
  </perch:before>
      <li><a href="/category.php?cat=<perch:category id="catPath" />" class="HomeBtn SmallBtn"><perch:category id="catTitle" /></a></li>
  <perch:after>
    </ul>
  </perch:after>
</perch:categories>
</div>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Sorry, where is the problem? Your first post suggested it was somewhere in the control panel. I'm not sure what we're trying to fix here.

It's the 'view page' link from the control panel to preview the detail page of a list and detail setup.

This list and detail page is using categories so I assume the problem could be do with that and how I've cleaned the URLs?

Elsewhere on the site a basic list and detail page "without categories" is working correctly.

...aaagh which it was. I found "my" error. no slash in /dress-{slug} sorry.

Amazing how contacting support focuses the mind. Or the little mind I've got left on a Friday afternoon.