Hi,

The node_load_multiple function is deprecated, use \Drupal\node\Entity\Node::loadMultiple() instead.
Function node_load_multiple.

Regards,

Comments

mgoncalves created an issue. See original summary.

mgoncalves’s picture

Assigned: mgoncalves » Unassigned
Status: Active » Needs review
StatusFileSize
new765 bytes
hgunicamp’s picture

Status: Needs review » Reviewed & tested by the community

I revised each assignment of the $subscriber variable and, for me looks enough importing only the SubscriberInterface, once 'SubscriberInterface::INACTIVE' and 'SubscriberInterface::ACTIVE' are used in simplenews.module file.

hgunicamp’s picture

Status: Reviewed & tested by the community » Needs review

Sorry. Wrong Issue.

hgunicamp’s picture

Status: Needs review » Reviewed & tested by the community

After applying the 'simplenews-node_load_multiple-2876615-2-8x.patch' patch and using the command

find . -type f \( -name '*.inc' -or -name '*.module' -or -name '*.php' \) -exec grep --color=auto -e '\bnode_load_multiple' {} \+

I did not find any extra reference to 'node_load_multiple' function.

jonathanshaw’s picture

Title: SimpleNews using deprecated function. » Replace deprecated node_load_multiple
berdir’s picture

Status: Reviewed & tested by the community » Needs work

That appears to be dead D7 code, it uses l() and $item->nid which are things are not going to work in D8 at all.

No point in updating that, needs to be investigated if that function is unused and possibly removed completely.

adamps’s picture

Title: Replace deprecated node_load_multiple » Remove/fix dead D7 code
adamps’s picture

Title: Remove/fix dead D7 code » Remove dead D7 code
Category: Bug report » Task
Priority: Normal » Minor

There doesn't appear to be any code that calls this function, so can just remove it.

neeravbm’s picture

I have attached the patch to remove the function simplenews_recent_newsletters() function. The reason being that someone could be using this function in his own custom module. Removing this function will break his code. Anyway, the patch is attached in case you decide to go ahead with removing this function.

adamps’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -ciandt-contrib +Plan to commit

Thanks @neeravbm

Removing this function will break his code.

Thanks for checking. However see #7 this function will not work so any code calling it is already broken.

adamps’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -Plan to commit

Oops I accidentally changed the status in #11.

@neeravbm NB your patch is in the wrong format - as @TR pointed out on the other issue.

Please read how to make patches before posting any more!

adamps’s picture

Status: Needs work » Needs review
StatusFileSize
new1.32 KB

  • 9aff600 committed on 8.x-1.x
    Issue #2876615 by AdamPS, mgoncalves, hgunicamp: Remove dead D7 code
    
adamps’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.