Keyword

Error: 0 Call to a member function isSite() on null when trying to edit item

  • Chas Large
  • Chas Large's Avatar Topic Author
  • Offline
  • New Member
  • Jazz is the only music
More
2 months 1 week ago #173116 by Chas Large
Chas Large created the topic: Error: 0 Call to a member function isSite() on null when trying to edit item
Hi,

Had to do a restore of a site due to corrupted files.

Got all working except Front End Editing of items

When user is logged in and clicks edit button, gets error page with message:

0 Call to a member function isSite() on null

Any suggestions please?

Chas

"You blows who you is." Louis Armstrong

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 1 week ago #173118 by Fotis
Fotis replied the topic: Error: 0 Call to a member function isSite() on null when trying to edit item
Check if you're using an old override for itemform.php. Actually just delete any if they exist inside /templates/YOUR_TEMPLATE/html/com_k2/default/.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Chas Large
  • Chas Large's Avatar Topic Author
  • Offline
  • New Member
  • Jazz is the only music
More
2 months 1 week ago - 2 months 1 week ago #173128 by Chas Large
Chas Large replied the topic: Error: 0 Call to a member function isSite() on null when trying to edit item
Hi Fotis,

I just deleted the itemform.php file and now I can edit the item, thanks.

However SAVE works OK But close does not close the form, it stays on the screen, only way to return to the site is to use the browser BACK Click twice.

Should CLOSE not just return you to the correct form view?

"You blows who you is." Louis Armstrong
Last edit: 2 months 1 week ago by Chas Large.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 1 week ago #173130 by Fotis
Fotis replied the topic: Error: 0 Call to a member function isSite() on null when trying to edit item
It should but your browser may have cached JS code from the itemform.php override you previously had. In any case, opening the browser's console will reveal why nothing happens when you click "close" in the edit form.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Chas Large
  • Chas Large's Avatar Topic Author
  • Offline
  • New Member
  • Jazz is the only music
More
2 months 1 week ago #173132 by Chas Large
Chas Large replied the topic: Error: 0 Call to a member function isSite() on null when trying to edit item
Hi Fotis,

Ran the Inspector / Console when page is opened by front end.

When close, I get the attached error,

"Scripts may close only the windows opened by it"

Any further advice?

Chas

"You blows who you is." Louis Armstrong
Attachments:

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 1 week ago #173133 by Fotis
Fotis replied the topic: Error: 0 Call to a member function isSite() on null when trying to edit item
Works just fine on my test sites and no error in the browser console. Which K2 version are you using and on what browser? Is your browser up to date?

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Chas Large
  • Chas Large's Avatar Topic Author
  • Offline
  • New Member
  • Jazz is the only music
More
1 month 3 weeks ago #173248 by Chas Large
Chas Large replied the topic: Error: 0 Call to a member function isSite() on null when trying to edit item

Fotis wrote: Works just fine on my test sites and no error in the browser console. Which K2 version are you using and on what browser? Is your browser up to date?


Hi Fotis,

Apologies for the delay in responding:

Using K2 v2.10.0
[Dev Build 20190522]

Have been using Chrome and just tested again. Opened an item in the front end, saved and got the "item saved" message, clicked CLOSE and the page just closed the tab completely.

Just tried FireFox and when CLOSE is clicked, the age refreshed but did not close back to the normal page, remained in the Edit mode.

Not sure if this is relevant but when saving a Category I get the following error:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3

My server still runs MySQL 5.7 but I can upgrade to MariaDB 17 if you think this may resolve both problems.

Thanks

Chas

"You blows who you is." Louis Armstrong

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 month 3 weeks ago #173252 by Fotis
Fotis replied the topic: Error: 0 Call to a member function isSite() on null when trying to edit item
I'm confused. How did you save a category when there's no category editing in the frontend?

The SQL error may be caused by an outdated 3rd party K2 or system plugin.

As for the error on your console tab, perhaps another JS script is attaching click events to K2's frontend editing controls.

If you want me to have a thorough look, use the contact form on this site and send me temporary super-user access.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Chas Large
  • Chas Large's Avatar Topic Author
  • Offline
  • New Member
  • Jazz is the only music
More
1 month 1 week ago #173287 by Chas Large
Chas Large replied the topic: Error: 0 Call to a member function isSite() on null when trying to edit item
Hi Fotis,

Sorry for the delayed response.

The Saving of the Category is in the back end not the front end.

The problem with the SAVE of the Item via Front End seems to have changed, when SAVE is clicked the whole page closes - the Chrome Tab is closed.

I'll send you access details via the contact form, I'd be obliged if you can take a look.

Thanks
Chas

"You blows who you is." Louis Armstrong

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 month 2 days ago #173336 by Fotis
Fotis replied the topic: Error: 0 Call to a member function isSite() on null when trying to edit item
Are you on K2 v2.10 already? github.com/getk2/k2/archive/master.zip

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum