Closed (fixed)
Project:
Read Time
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Mar 2019 at 08:23 UTC
Updated:
5 Jun 2024 at 11:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
muhdmishal commentedHi @vollepeer.
Will be working on this. Meanwhile, it will be very much appreciated if you can provide a patch for this (if you have already done this.)
Thanks
Comment #3
fjgarlin commentedHere is a patch that we used to support paragraphs. I hope it helps.
All credit goes to Tim Clifford (@timclifford). I'm mostly a messenger on his work on this patch.
Comment #4
fjgarlin commentedComment #5
tessa bakkerAfter a quick look at the patch...
You could check if the referenced field has an Entity of the type ContentEntityInterface, and loop it again through read_time_calculate(). In this way you can calculate paragraphs in paragraphs or custom entities in paragraphs, etc.
Comment #6
tessa bakkerHere is the D7 version that can calculate words in paragraphs.
How to use:
Added features:
Comment #7
tessa bakker3 small fixes for D7 patch.
Comment #8
Bensbury commentedHi,
I tried applying the patch from #7 for Drupal 7 using two different messages but each time it has failed.
### Update ###
I didn't see a Dev version listed on the main page but since this a DEV thread for D8 I drush downloaded the D7 version for dev and it exists. This is what you run the patch against from #7.
If this is incredibly obvious, it wasn't to the more dense such as me, so for anyone else the Patch in #7 works for me but make sure you download the DEV version of D7 Read Time and run the patch on that.
Thanks for the patch! Really important to make this usable for a lot of people.
Comment #9
zwerg commentedAny work on this Drupal 8 issue?
Comment #10
isaacrc commentedReroll #3 Patch to D9 since entity_get_form_display it's deprecated. Tested with the latest dev branch and Drupal 9.1.6
Comment #11
patrick.thurmond@gmail.comOk, I rerolled the #10 patch because we have the same need for a site that uses Bricks instead of Paragraphs. Our organization actually uses both, but primarily Paragraphs. Thus, I am now attaching Bricks functionality to this as a highly useful addendum.
Comment #12
patrick.thurmond@gmail.comMy last one had one mistake that I hadn't considered. It was calling the render method to get the contents. But doing so passes by reference. This then removes it from the final render array and the field no longer renders on the page. I had been following along the code process in xdebug and missed this simple check.
I have fixed it in this next patch here.
Comment #13
patrick.thurmond@gmail.comFurther improvements to avoid errors and work more efficiently. This also removes the reference to te build array passed in from the node view hook.
Comment #14
joco_sp commentedReroll of the #10 patch for 2.x version of the module. I did it for this instead of #13, because we are using the patch for quite some time and it worked perfectly for us.
@pthurmond could you do the same for your patch? I'll test it afterwards and commit it if everything will work, because supporting both modules would be great :)
Comment #15
3liHave been using patch #14 for a while, works well.
Comment #16
introfini commentedPatch #14 works well. Thanks!
Comment #18
joco_sp commentedThank you all for the support. I merged the patch #14. It will be available in the next release.