167 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 3-4 years
  • Europe
  • Bought between 10 and 49 items
  • Exclusive Author
Decneo says

Hi, My new theme got these notice on description menu function

Reference for the function code by kriesi : http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output

On my side I didn’t get any notices like the reviewer sent me the pic here:

so the problem is in the line 44, 46, 47, 49 for the property of non object,here is my code:

please help me to figure it out please because I didn’t get the notices on my side so I can’t test to fix it.

Best regards, Decneo

23 posts
  • Elite Author
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Referred between 50 and 99 users
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
quadroIdeas says

Hi, Decneo!

I sugest two things. First, try to post a more complete code. The code you posted is referencing a variable named “args” and we don’t see in what you posted where is that declared. So, first of all, try to post what comes before that in your code.

Second, try by all means to replicate the bug for yourself. Did the error appear on the back end or at the front end? If you can’t see it when you navigate the site or the admin, try to log out (off course, not for the admin ;) ) and see if then it appears. It this particular case, I don’t think that could be it, but you never know. Again, try to post more code here.

And have a happy new year! :)

167 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 3-4 years
  • Europe
  • Bought between 10 and 49 items
  • Exclusive Author
Decneo says

Hi, Decneo!

I sugest two things. First, try to post a more complete code. The code you posted is referencing a variable named “args” and we don’t see in what you posted where is that declared. So, first of all, try to post what comes before that in your code.

Second, try by all means to replicate the bug for yourself. Did the error appear on the back end or at the front end? If you can’t see it when you navigate the site or the admin, try to log out (off course, not for the admin ;) ) and see if then it appears. It this particular case, I don’t think that could be it, but you never know. Again, try to post more code here.

And have a happy new year! :)

Hi, quadroIdeas. Thank you for your replied Happy new year too.

Here is my complete code :

( click image to link to big image )

the notice appear on the front end after using debug bar plugins but on my side I didn’t get the notice only for the reviewer. I only got this soft rejected 1 week now, so I would like to figure this out.

Best regards, Decneo

23 posts
  • Elite Author
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Referred between 50 and 99 users
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
quadroIdeas says

Alright… it surely looks like the variable $args isn’t being defined. Which for me is weird. I should study that walker class a little more, I think. Give me some time and I’ll try to figure that out.

167 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 3-4 years
  • Europe
  • Bought between 10 and 49 items
  • Exclusive Author
Decneo says

Alright… it surely looks like the variable $args isn’t being defined. Which for me is weird. I should study that walker class a little more, I think. Give me some time and I’ll try to figure that out.

Thank you quadroIdeas for your time to replied me,I appreciated.

Best regards, Decneo

167 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 3-4 years
  • Europe
  • Bought between 10 and 49 items
  • Exclusive Author
Decneo says

Hi, everyone so sad for this issue, It took my time 2 weeks now. I’ve added $args = (object) $args; before $item_output = $args->before; and thought it will solve the issue and re-submission the theme waiting 3 days and got this from reviewer :

Additionally, we have some extra feedback for you:

This is a resubmission of a previously rejected submission. Resubmitting without making the required changes or any improvements is not considered acceptable use of the Envato marketplaces and repeated attempts may result in a temporary or permanent suspension of authorship.

the problem is on my side I didn’t get those notices like the picture below, if I didn’t get so it hard for me to fix the issue and make those notices gone.

on my side :

debug bar and another plugin : ( Enable WP_DEBUG to true )

No notice : Example on my homepage

( click for full image )

If I got the notice I will hesitate to fix it, but honestly I didn’t get those. I didn’t think to cheat anyone.

Best regards, Decneo

167 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 3-4 years
  • Europe
  • Bought between 10 and 49 items
  • Exclusive Author
Decneo says

Bump..

814 posts
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 1 and 9 items
  • Referred between 1 and 9 users
  • Serbia
  • Has been a member for 5-6 years
rvision_ says

How about

var_dump($args);

so you can check what’s happening with that? It might be null (or non-object) only for certain menu items, so you can write check code to avoid errors…

23 posts
  • Elite Author
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Referred between 50 and 99 users
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
quadroIdeas says

I would also suggest trying to activate your theme on a fresh WP install (and on a new database) before you create any menu. Try to see if you get the errors that way. The var_dump would help too, so try to bring the results to here.

167 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 3-4 years
  • Europe
  • Bought between 10 and 49 items
  • Exclusive Author
Decneo says

How about
var_dump($args);
so you can check what’s happening with that? It might be null (or non-object) only for certain menu items, so you can write check code to avoid errors…

I’ve tried use var_dump($args); before but didn’t see the null object.

here is the screenshot :

Best regards, Decneo

by
by
by
by
by
by