Recent Topics

Undefined variable: Item in /inc/_blog_main.inc.php

Started by on Nov 16, 2018 – Contents updated: Nov 16, 2018

Nov 16, 2018 09:36    

Hello,
whenever I write a new post, saved it and then try to get a preview of that page I get an error message ahead of the preview.
Background information: The collection is called by subdomain (linz.genba.org). To see the preview I normally have to log in in the frontpage with another account. Then the preview is shown correctly. If I call a preview without being logged in at the frontpage I get that error message. So I need to handle two logins to get work in backend and front work without that error.
How can I fix this?

Thanks and Regards; Will
Here is a screenshot:

Complete URL where problem appears :https://linz.genba.org
Exact b2evolution version :6.10.3

Nov 16, 2018 11:24

6.10.3
[/inc/_blog_main.inc.php]
Line 659

elseif( ! is_logged_in() && in_array( $Item->status, array( 'community', 'protected' ) ) )

Wondering if this is the line you have in the file as it should only be bothered with the variables if you are not logged in and it seems that as you are posting you are logged in ???

How do you get a preview after saving?

Nov 16, 2018 12:16

@amoun thats the line, 659
The preview shows up in a new Tab within my Firefox Browser. Before calling a preview I save the post but keep the page edited (Save & Edit)

Nov 16, 2018 15:14

Sorry I must be missing a lot here.
Using Firefox 60.3ers and b2evo 6.10.34
1) Make post :: Save and Edit So (I'm still in the back office)
2) Open new tab (tab 2) in Firefox :: Go to my site (I am still logged in on the new tab) :: Click on the Post in second tab all seems OK
3) Go back to original tab and try Preview - This opened a new tab - there was a flash in the URL of undefined variable but page resolved OK
4) Go to tab2 and do the same no problem :: Preview opens a new tab with the post no sign of error message in url -maybe it was quicker - I'm on a 500Kb connection - so slow
5) close two preview tabs
6) repeat 3) above and no problem

Nov 16, 2018 15:21

Tried again with just one tab; preview opens a new tab and there may have been a flash in the address bar about undefined variable but too quick to know.

Although I can not edit via evobar in the Preview tab I can edit from my edit link in the post.
So edited and then Previewed form the Preview Tab and no error


Form is loading...

Multiple blogs solution – This forum is powered by b2evolution CMS, a complete engine for your website.