Page Password

Permalink Browser Info Environment
We are getting an error message regarding PagePassword. We can't get to our site and we can't log into it.

An exception occurred while executing 'select COUNT(*) as c from PagePassword where cID=? UNION select COUNT(*) as c from PagePassword where recursive=1' with params ["1"]: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'recursive=1' at line 1

Let us know what you think. Thank you.

Type: Ticket
Status: Archived
prco6552
View Replies:
ELIC replied on at Permalink Reply
ELIC
I'm getting the same error after updating Brew on my local machine. I'm using MariaDB.

After following your archived bug report, which suggested replacing the package withhttps://www.dropbox.com/s/tzsxah5h7lcldh6/page_password.zip?dl=0,... I'm able to see my site and login, but I'm getting an error when going to the Page Password section in the Dashboard. I then uninstalled the package, reinstalled it, and I'm getting the following error:

An exception occurred while executing 'ALTER TABLE PagePassword CHANGE recursive recursive INT DEFAULT NULL': SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'recursive recursive INT DEFAULT NULL' at line 1
hanicker replied on at Permalink Reply
hanicker
Hi, can you please try replacing the package with this one?
https://www.dropbox.com/s/w6q99587137szzt/page_password.zip?dl=0...
Thanks
Regards

Nicola
ELIC replied on at Permalink Reply
ELIC
Hey, I uninstalled the package which didn't delete the two database tables, so I went ahead and manually deleted those. I then installed this new package and right after installation it gave me this error:
An exception occurred while executing 'CREATE TABLE PagePassword (cID INT UNSIGNED NOT NULL, passwordID INT UNSIGNED NOT NULL, recursive INT DEFAULT NULL, PRIMARY KEY(cID, passwordID)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB': SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'recursive INT DEFAULT NULL, PRIMARY KEY(cID, passwordID)) DEFAULT CHARACTER SET ' at line 1

When I visit any other page I now get this error:
An exception occurred while executing 'select COUNT(*) as c from PagePassword where cID=? UNION select COUNT(*) as c from PagePassword where `recursive`=1' with params ["1"]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'elic.pagepassword' doesn't exist

Thanks for the help.
ELIC replied on at Permalink Reply
ELIC
Also, my production server is not using MariaDB, rather MySQL Database Server. Not sure if that matters or not.

Thanks.
hanicker replied on at Permalink Reply
hanicker
Hi can you please try manually running
CREATE TABLE IF NOT EXISTS PagePassword (cID INT UNSIGNED NOT NULL, passwordID INT UNSIGNED NOT NULL, `recursive` INT DEFAULT NULL, PRIMARY KEY(cID, passwordID)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS `PagePasswordPasswords` (
  `passwordID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `value` longtext COLLATE utf8_unicode_ci,
  PRIMARY KEY (`passwordID`)
) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;

to manually create the table?

Thanks

Nicola
ELIC replied on at Permalink Reply
ELIC
I ran the query before and after installing the package again. I'm getting this error now:

An exception occurred while executing 'ALTER TABLE PagePassword CHANGE recursive recursive INT DEFAULT NULL': SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'recursive recursive INT DEFAULT NULL' at line 1
hanicker replied on at Permalink Reply
hanicker
Can you try removing the db.xml file inside the package before install?
ELIC replied on at Permalink Reply
ELIC
That worked. I was also able to add a protected page from Dashboard > Page password, however, the Edit button is not there, the url in the Page path column is not a link, and the Password "Click to reveal" is not there.

Thanks.
hanicker replied on at Permalink Reply
hanicker
Great. The Click to reveal function was removed in the last release, anyway you should still be able to open the url by clicking on the page name column.
ELIC replied on at Permalink Reply
ELIC
Sounds good, thanks for the quick replies!
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.

concrete5 Environment Information

Can't log in to site to get this information. Concrete5 version 5.7

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.59.10 (KHTML, like Gecko) Version/5.1.9 Safari/534.59.10

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.