We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

one field causes massive page error

How Do I?

fensterbaby's avatar
fensterbaby
289 posts
2 years ago
fensterbaby's avatar fensterbaby

I got my hero widget to work but for two errors I just can’t solve.

(See code below)

When I replace the placeholder text “caption” with the field {caption} it totally breaks the page. I get 500 server errors or it just never loads.

Other fields display fine. I have called this field before - should not be a problem, just a simple text field.

Also, the page randomly selects one record on page load. When I do a page reload it loads a different entry and fields update except for the background image which stays the same despite the fact that it is dynamically called not a static url.

Page: https://www.aktest1.com/home/hero

code…

<!DOCTYPE HTML> <html lang=”en”>

<head> <style> .hero-wrapper { clear: both; position: relative; width: 100%; text-align: center; font: 18px helvetica, sans-serif; color: white; }

.hero { background-repeat: no-repeat; background-attachment: scroll; background-position: center; background-size: 100% auto; }

.hero-sizing { padding-top: 33%; }

.hero-content { position: absolute; top: 0; bottom: 0; left: 0; right: 0; }

.hero-content:before { content: ’ ‘; display: block; height: 40%; }

.hero-content h1, .hero-content p { margin-top: 0px; margin-bottom: 6px; }

body { margin: 0; background-color: #d0d0d0; }

</style> </head>

<body> {exp:channel:entries channel="slider" status="open" limit="1" orderby="random" } <div></div> <div class=”hero-wrapper”> {exp:channel_images:images limit="1" field="slide" prefix="ci"}

<header class=”hero” [removed]>

<div class=”hero-sizing”></div> <div class=”hero-content”> <h1>{title}</h1> caption {speaker} </div> </header>

{/exp:channel_images:images}

</div> {/exp:channel:entries }

</body>

</html>

       
fensterbaby's avatar
fensterbaby
289 posts
2 years ago
fensterbaby's avatar fensterbaby

Okay, just had an idea and solved the field issue. I renamed {caption} field and it now works.

ONLY remaining issue is why the background image doesn’t change …

       
fensterbaby's avatar
fensterbaby
289 posts
2 years ago
fensterbaby's avatar fensterbaby

HA, got it

Add entry_id=”{entry_id}”to Channel images tag and bg now refreshes.

? 1
       
Robin Sowell's avatar
Robin Sowell
13,255 posts
2 years ago
Robin Sowell's avatar Robin Sowell

Dude- nice! I do get a 404 on the lazyload script: https://www.aktest1.com/jsjquery.lazyload.js. But it’s looking good.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.