Closed (fixed)
Project:
Read More Link
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2011 at 14:09 UTC
Updated:
27 May 2014 at 06:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rolandk commentedI am getting the same notice too...
Comment #2
justmagicmaria commentedSubscribe. Me also, on a page full of teasers of two types of content: Feed items (from the Feeds module) and Story, a custom content type. Feed item does not have a body field.
Edited to add:
Sorry this is not a patch, but I fixed this with this change to line 209 of read_more.module:
(I added the array_key_exists test.)
Maria
Comment #3
aliad commentedHopefully this is helpful, since your fix worked for me:
GNU nano 2.3.1 File: read_more.patch Modified
Comment #4
dddave commentedComment #5
darkshared commentedI had the same error and could fix it following JustMagicMaria comment.
In my case, the bug appeared after editing the poll content type to add a text camp. Deleting the text camp I just created, makes the error disapear.
PD: sorry for my english, I am still learning :(
Comment #6
Refineo commentedI had the same issue and I also fixed it with #2 (thank you !)
There is a typo in #3 patch I belive (or am I wrong ?)
Is:
I think it should be:
Will you commit this patch to 7.x-1.x-dev ?
Comment #7
jackalope commentedHere's a functional patch based on #2. Thanks, Maria and everyone else who worked on this!
Comment #8
dnewkerk commentedTested #7 and it works. Thanks! Marking RTBC
Comment #9
femrich commentedUnfortunately I am among the patch-challenged. Any idea when this may find its way into 7.x-1.x-dev?
Comment #10
dnewkerk commentedfemrich, fortunately this patch is really just one changed line. If you aren't able to apply the patch but want to get the fix for the moment, simply open read_more.module, search for this line:
if (preg_match('!</?' . $elements . '[^>]*>\s*$!i', $node->content['body'][0]['#markup'], $match, PREG_OFFSET_CAPTURE)) {And replace it with this line:
Though @Todd Nienkerk - can we get this patch added to dev?
Comment #11
femrich commentedThanks, keyz. I'll try this.
Comment #12
vikingew commentedSorry to be a pester but I wonder if the correct solution isn't the one used in #1307400: If teaser has no HTML, cannot be inserted inline, solving another problem with this function? I may be wrong but think it's correct to be bold about it possibly avoiding a less favourable commit. The solution suggested also appear a bit to general to me and from what I have read no one have really identified what the problem is, just suggested a solution that (possibly) works for some, but maybe not for all.
In such case the solution looks like this:
I cannot make a proper patch right now so leave that up to someone else, but even better is if #1307400: If teaser has no HTML, cannot be inserted inline could go in as it catches 2 flies in 1 smack so to say ;-)
Comment #13
dnewkerk commentedHere is a patch version of yettyn's suggestion in #12. Works for me. Others please try the patch, as well as review whether this solution or the previously suggested one is the correct direction for the module to proceed with. Thanks!
Comment #14
vikingew commentedThanks for that Keyz but actually what I suggested was to use the full code change of #1307400: If teaser has no HTML, cannot be inserted inline as these 2 issue probably is a dupe of each other, but not sure which to set as dupe as this one appear to be older while the other actually identify the problem and gives a correct solution.
Again I can't make a proper patch because I don't have git but in my own drupal svn overlay I have implemented it like this, it also include a small fix where I have changed the Read More html code filed from textfield to textarea because I find the 60 chars drupal give you to be too short if you like to be creative with the link ;-)
It's the change I have done for my personal taste on the current dev version and it works very well.
Comment #15
john franklin commentedIt looks like an
isset($node->content['body']has been added to the code since this bug was introduced, which may be sufficient to fix this issue.I'm going to mark this 'fixed', but if you guys think this needs a more robust patch, please reopen it.