Problem/Motivation

I am unable to get node add buttons to show up. Im not sure when this started to happen, but I believe this used to work properly.

After digging into the code I noticed that
public static function checkAccess(string $bundle) {
the value for $bundle is 'node'
changing the arguments in this function to
public static function checkAccess(string $entity_type, string $bundle) {
gets the correct value for $bundle.

I will provide a patch/MR

CommentFileSizeAuthor
#5 views-add-button--access-check-MR12.patch2.56 KBloze
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

loze created an issue. See original summary.

loze’s picture

Issue summary: View changes

loze’s picture

Status: Active » Needs review

MR 12 fixes the access check for me with the node and taxonomy plugins

loze’s picture

StatusFileSize
new2.56 KB

here is a patch of the MR for composer

mortona2k’s picture

Status: Needs review » Reviewed & tested by the community

I am seeing the buttons as user 1 at least, but the current code is clearly flawed and the patch corrects it.

niklp’s picture

Why is the patch against dev and not the latest release...?

mortona2k’s picture

There were changes to function definitions from the last commit on dev: https://git.drupalcode.org/project/views_add_button/-/commit/65bd7d0eb8a...

I think there are some differences between dev and the current release in the file you linked.

Since this MR also changes those, you probably want both.

terry_kolodiy made their first commit to this issue’s fork.

terry_kolodiy’s picture

Status: Reviewed & tested by the community » Fixed

Thank you guys for noticing and fixing this issue
Merged to 2.0.x

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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