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
5 years 2 months ago #173116 by Chas Large
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.

More
5 years 2 months ago #173118 by JoomlaWorks
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/.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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
5 years 2 months ago - 5 years 2 months ago #173128 by Chas Large
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: 5 years 2 months ago by Chas Large.

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

More
5 years 2 months ago #173130 by JoomlaWorks
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.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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
5 years 2 months ago #173132 by Chas Large
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.

More
5 years 2 months ago #173133 by JoomlaWorks
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?

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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
5 years 1 month ago #173248 by Chas Large

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.

More
5 years 1 month ago #173252 by JoomlaWorks
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.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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
5 years 1 month ago #173287 by Chas Large
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.

More
5 years 1 month ago #173336 by JoomlaWorks
Are you on K2 v2.10 already? github.com/getk2/k2/archive/master.zip

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum