[Soft Rejected] I can’t see what reviewer sees. Please help

My recent item was soft rejected because of this issues: https://envato.d.pr/hYNjns. I checked in all and don’t find the issues. Could someone help me how to find this issues and get it fixed? Why am I not able to see this issues. I tried in fresh installation, installing test data, debugger enabled, installing all the themes plugins but no luck. Please somebody help me. Thnx



You could try to change your PHP version to 7.1 or to 5.6

1 Like

Make sure to enable wp debug and use this plugin https://wordpress.org/plugins/debug-bar/

1 Like

Yes we checked on PHP version 5.4 and latest, Wp-Debug is enabled, Debug-Bar plugin is installed still we don’t see this issues on our server. What other option would be the cause of this issues?

1 Like

You properly need to enable display errors with your php.ini config, Most shared hosting disable this.

BTW can you show me what code is in line #433 inside your nav walker class ?

Just install the theme on a clean database with WP-debug enabled. You will see the same error messages. The menu you’re using is trying to print some output but when you don’t have anything on the menu, it throws error.

1 Like

This is what we have in the code: http://prntscr.com/jkm0a1

We checked in fresh installation but still we dont see the error. Even when menu is not assigned.

Do this on any line that uses $args->…

if( is_object( $args ) ) {
$item_output .= $args->before …

1 Like

Have you tried to install xdebug?

Yea this might work. We will make these changes and re-submit it.

*Not an official answer :slight_smile:

That type of error “notice trying to get property of non-object in…” appears when you are trying to get attributes of an object thinking it is an object, but in fact it is an array of objects.

So first you should access the array element, which is an object and only then access its attributes, like this, in your case: $args[0]->before

I think the error the reviewer sees is when there are no menus defined or no menus set for the location in Appearance->Menus

To fix it, you should always check first that a menu is defined, something like this:

if (has_nav_menu('primary')) {...
1 Like

I guess this solved the issues because I did not get any feedback on this issues:

But again soft rejected with the reason all Warning shown by Envato Theme Check plugin needs to be solved :frowning:
Question: Do we need to sanitize output variable which is already sanitized: http://prntscr.com/jkyrki

Glad this helped :slight_smile:

From my experience I can say using echo $ is not allowed because you have to sanitize just before your output.
I think reviewers will do global search in your code for any echo $

Use “print”

1 Like