backdrop-contrib / feeds_tamper

Feeds Tamper provides a small plugin architecture for Feeds to modify data before it gets saved.
GNU General Public License v2.0
0 stars 2 forks source link

Access denied when editing or deleting tampers #4

Closed ghost closed 10 months ago

ghost commented 4 years ago

When trying to edit or delete a tamper, I get an 'Access denied' error:

You are not authorized to access this page.

ghost commented 4 years ago

It looks like the issue is here (in feeds_tamper_access()):

elseif (is_object($importer)) {
  $importer = $importer->id;
}

All keys in the $importer object are suffixed with :protected, so the code above should instead be:

elseif (is_object($importer)) {
  $importer = $importer->id:protected;
}

(or whatever's adding that :protected suffix should be removed).

ghost commented 4 years ago

Actually, even if I hack the module to return TRUE regardless, I then get this error:

Empty configuration identifier.

So possibly a larger issue here...

herbdool commented 4 years ago

Maybe it's a PHP version issue. Perhaps we need to ensure it's forward compatible. I've been testing it in Lando and default is PHP 7.2

herbdool commented 4 years ago

I think this is the easiest approach: https://github.com/backdrop-contrib/feeds_tamper/commit/e60b478e08a4ab5914d92604096da0d4c03f6250 - access it with the getter which is available in the parent class.

herbdool commented 4 years ago

I'm going to say this is tentatively solved. Let me know if not.

ghost commented 4 years ago

Sorry, didn't fix it. I still get:

Access denied You are not authorized to access this page.

herbdool commented 4 years ago

Is this still an issue @BWPanda. I haven't been able to replicate.

ghost commented 4 years ago

@herbdool Sorry, I had to stop using this module.

laryn commented 10 months ago

Closing since we can't replicate. If someone has this issue again, please reopen or open a new issue with steps to reproduce.