Errors testing on both 8.3.2 and 8.4.0

Permalink Browser Info Environment
I am testing for a client who got errors trying your package. I get two different error messages from 2 testing installs. You can see the tracebacks on the URLs below.

8.3.2 - PHP 7.1 - Stucco
Call to a member function isActive() on null
https://58.steelesoft.net/contact...

8.4.0 - PHP 7.2 - Elemental
count(): Parameter must be an array or an object that implements Countable
https://57.steelesoft.net/contact...

I tried PMing you about this, but never heard back.

Please advise ASAP.

Thank you - John (you should have my email address already)

Type: Discussion
Status: In Progress
jasteele12
View Replies:
jasteele12 replied on at Permalink Reply
jasteele12
Here's what I had to do to get it to work with both.
packages/page_password/src/Model/PagePasswordModel.php need to be modified:

At the top, add:
use Core;

In onPageChange():
if (!empty($providedPassword) || count($sessionPasswords) != 0)

changed to:
$cntPasswords = (!is_array($sessionPasswords) ? 0 : count($sessionPasswords));
if (!empty($providedPassword) || $cntPasswords) {

In both getFromSessioin() and storeInSession():
$session = new SymfonySession();

Replaced with:
$session = Core::make('app')->make('session');


FYI - John
tabercreative replied on at Permalink Reply
tabercreative
I can't get this fix to work and this add-on has downed the site entirely.

Can you please clarify a bit on the "use Core;" portion. Where exactly does that go and does it replace anything?
hanicker replied on at Permalink Reply
hanicker
Hi, I'm sorry for this problem. Are you having the same error? Do you get any error message?

Thanks
Regards
tabercreative replied on at Permalink Reply
tabercreative
I just realized this wasn't the same error as I'm experiencing. I posted mine in the Support as well. It looks like others have had this in the past.

https://www.concrete5.org/marketplace/addons/page-password1/support/...
hanicker replied on at Permalink Reply
hanicker
Hi, sorry it seems that the reply to the pm has not been sent. It was:

I had a similar ticket that was due to the package like Form Plus? I've just readhttps://www.concrete5.org/marketplace/addons/form-plus1/support/call... that has a similar problem.

I checked both urls but didn't see any error. Do I have to insert a password to read them?

Thanks
Regards

Nicola
hanicker replied on at Permalink Reply
hanicker
Sorry I was replying at the same time. Thanks for your fixes. It is strange as I have some working installations on 8.4 with the current package.
It seems due to the PHP version, anyway I'll update with your fixes.

Thanks again
Regards

Nicola
jasteele12 replied on at Permalink Reply
jasteele12
Hi Nicola,

Happens quite often, that's why I suggested email and gave you my address.

Both those URLs are now working after the above changes are made (I just tested both in a new Private Window).

They do require a password and are being redirected to /passwordrequest

concrete5 Environment Information

8.3.2 - PHP 7.1 - Stucco
8.4.0 - PHP 7.2 - Elemental

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0

Hide Post Content

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

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.