Skip Navigation

[Resolved] Undefined index

This thread is resolved. Here is a description of the problem and solution.

Problem:

Get some PHP warning message when use Access plugin.

Solution:

Please check these in your website:

1) Make sure you are using the latest version of Toolset plugins, you can download them here:

https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2019, and test again

Relevant Documentation:

This support ticket is created 5 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by larryL 5 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#1193280
Capture.PNG

I am trying to:
Let a logged in user see a view (page). (ref: https://toolset.com/forums/topic/specialized-access-to-a-view/#post-1169954 )
Link to a page where the issue can be seen:
Can't show because it requires special access. The error shown is:

Warning: in_array() expects parameter 2 to be array, null given in /home/s21/html/wp-content/plugins/types-access/includes/Helper.php on line 1619

Notice: Undefined index: read in /home/s21/html/wp-content/plugins/types-access/includes/Helper.php on line 1619

Warning: in_array() expects parameter 2 to be array, null given in /home/s21/html/wp-content/plugins/types-access/includes/Helper.php on line 1619

This happens immediately when the user logs in to the view (page) with access enabled.

I expected to see:

The view results.

Instead, I got:

Redirected to the Wp admin dashboard (user profile) with the error on the top:

Warning: in_array() expects parameter 2 to be array, null given in /home/s21/html/wp-content/plugins/types-access/includes/Helper.php on line 1619

Notice: Undefined index: read in /home/s21/html/wp-content/plugins/types-access/includes/Helper.php on line 1619

Warning: in_array() expects parameter 2 to be array, null given in /home/s21/html/wp-content/plugins/types-access/includes/Helper.php on line 1619

#1193314

Also, if I deactivate access then I just get redirected to the user profile page instead of seeing the page (view) they should see. So something is wrong.

#1193490

Hello,

Thanks for the details, I can login into your website with user name "toolset"

But I am not sure where I can see the problem as you mentioned above:

Warning: in_array() expects parameter 2 to be array, null given in /home/s21/html/wp-content/plugins/types-access/includes/Helper.php on line 1619

And

if I deactivate access then I just get redirected to the user profile page instead of seeing the page (view) they should see

So I have checked these pages, for example:
hidden link
hidden link

But there isn't the same problem as you mentioned above.

Please check these in your website:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2019, and test again

3) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1193537

Hi, the reason you where not able to see the issues is because it only happens to users NOT admins who login to the client portal. So you would need to goto hidden link and login as

UN: mahitest
PW: PasswordABC1

This will show you the client-portal which is fine. Then goto:

hidden link

For some reason it asks you to relogin. Then it gives you the error I'm talking about.

Larry.

PS - I omited the DBDUMP because I think you misunderstood me the first time.

#1193547

Thanks for the details, I can see the problem when login with username "mahitest".

Since you are using old version of Toolset plugins, for example:
Toolset Access 2.6, but the latest version is 2.6.1, please try as I mentioned above:
https://toolset.com/forums/topic/undefined-index/#post-1193490

1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2019, and test again

3) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1193555

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.