Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Forced to add calculate_reading_time=“yes” as parameter to see {reading_time} fields

Status Resolved
Add-on / Version Reading Time Pro 1.0.4
Severity
EE Version 7.1.6

Marty Stake

Oct 28, 2022

When trying to use any reading time pro fields, e.g. {finished_reading_time:relative} or {reading_time}, within an entries tag, I can only see set values if calculate_reading_time=“yes” is in the {exp:channel:entries} parameters. Nothing is disabled.

Leaving off calculate_reading_time=“yes”  just results in a “blank” (and not “{reading_time}”).

This is problematic if a user clears the “reading time” in the back end, but then visits the listing page before the entry, resulting in an incorrect time estimation.

Thanks!

 

 

#1

BoldMinded (Brian)

Can you provide some more context? Template tag example perhaps?

#2

Marty Stake

Sure! I’m building a site now. Has only one entry currently, one entry in an “articles” channel. Its all local, so I can arrange access if need be. Standard set of other addons, like bloqs, etc.

I’ve already cached the reading time value with a visit to an article page that displays all the content, which has set the value of {reading_time} to 204 seconds correctly:

super simple, non-article page. Two tags back to back on a page by themselves show the issue for me:

THIS shows “reading time: 204” {exp:channel:entries channel=’articles’ dynamic=”no” require_entry=”yes” limit=’1’ calculate_reading_time=”yes”} reading time: {reading_time} {/exp:channel:entries}

THIS shows “reading time:” {exp:channel:entries channel=’articles’ dynamic=”no” require_entry=”yes” limit=’1’} reading time: {reading_time} {/exp:channel:entries}

#3

BoldMinded (Brian)

Thanks for the examples, when I find some time I’ll try to replicate this and see what the issue might be.

#4

Marty Stake

Quick note if it helps, I stumbled on another data point:

I noticed that I can correctly use the reading_time value in a conditional even though {reading_time} is “blank” in the content. eg:

{exp:channel:entries channel=’articles’ dynamic=”no” require_entry=”yes” limit=’1’} {title}

reading time: {reading_time}

{if reading_time == 7} what’s going on man? {/if} {/exp:channel:entries}

Entry Title reading time: what’s going on man?

#5

Marty Stake

Ate my ee code somewhat:

{exp:channel:entries channel='articles' dynamic="no" require_entry="yes" limit='1'}
 {title}

 reading time: {reading_time}

 {if reading_time == 7}
  what's going on man?
 {/if}
{/exp:channel:entries}
#6

BoldMinded (Brian)

Comment has been marked private.

#7

Marty Stake

Comment has been marked private.

#8

BoldMinded (Brian)

Glad to hear it’s working!

Login to reply