codeling / bfstop

Brute Force Stop Plugin (for Joomla!)
https://bfstop.bfroehler.info
GNU General Public License v3.0
36 stars 20 forks source link

Call to a member function getKeyName() on bool #181

Closed Goalfair closed 3 years ago

Goalfair commented 3 years ago

Since latest updates (starting from 1.4.2) when I access the "whitelist" and try to create new or edit existing entry I get error message: Call to a member function getKeyName() on bool

bfstop 1.4.1 + Joomla 3.9.25 = works bfstop 1.4.2 + Joomla 3.9.25 = doesn't work bfstop 1.4.3 + Joomla 3.9.25 = doesn't work bfstop 1.4.3 + Joomla 3.9.26 = doesn't work

Re-installing 1.4.1 after upgrading to 1.4.3 (using Joomla uploader without removing newer version first) breaks the whole site and extension files need to be deleted manually from server. Error message: 1146 Table 'db-redacted.#__bfstop_whitelist' doesn't exist

codeling commented 3 years ago

Thanks for the report, and sorry for the inconvenience. I will look into it tomorrow.

The table name changed between 1.4.1. and 1.4.2/3, that's why downgrading doesn't work. If you want to manually downgrade as temporary workaround, go to your database e.g. via phpmyadmin and rename the #_bfstop_allowlist table to #_bfstop_whitelist (with # being your individual joomla table prefix).

codeling commented 3 years ago

Fixed by https://github.com/codeling/com_bfstop/commit/c09f7833ca9e68a27f90a57b708024d1aaa0e9bc.

Goalfair commented 3 years ago

Sorry I still get error

0 Call to a member function getKeyName() on bool

whenever I try to add an IP to the whitelist. The message appears directly after clicking "New", so before the form is displayed. Adding IPs to "Blocked IPs" (database or htaccess) works fine.

Joomla! 3.9.27 + bfstop 1.4.3

codeling commented 3 years ago

The fix is not released yet, it's planned for 1.4.4 (which I will hopefully have time to release the upcoming weekend). If you can't wait, try applying the changes to the files as shown here: https://github.com/codeling/com_bfstop/commit/c09f7833ca9e68a27f90a57b708024d1aaa0e9bc