Keyword

Item edit form not working

  • Ruchika Nagarkar
  • Ruchika Nagarkar's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 month ago - 8 years 1 month ago #156905 by Ruchika Nagarkar
Item edit form not working was created by Ruchika Nagarkar
When I create a menu item for edit form to allow users to submit an article from frontend, It gives me the following error and the whole website doesn't work.
"Call To A Member Function Get() On Null "

I am using the following things:

1) Joomla 3.6.2
2) K2 2.7.1
3) Template Framework: Helix3

When I change the template to protostar the website loads normally but its gives "You are not authorized to view the resource". Though I login in frontend and check. In k2 permissions, I have also allowed registered users to create and edit items.

Kindly, guide me to the solution. And can we allow non-registered users to submit articles? I also want that articles are submitted, they must be first unpublished and then when admin reviews it, he can publish the item.

Hope to get your response soon.
Last edit: 8 years 1 month ago by Ruchika Nagarkar.

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

More
8 years 1 month ago #156932 by Randolph
Replied by Randolph on topic Item edit form not working
Same problem here :(

Tested several helix 3 based templates. But all of them crash if K2 item edit / submission form is enabled.

Getting empty page and error message: "Call to a member function get() on null".

Helix producers say it's a bug in K2. They advise to use Joomla articles system, instead of K2.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 month ago #156998 by Krikor Boghossian
Replied by Krikor Boghossian on topic Item edit form not working
Great, buy a template blame other devs and propose a terrible solution.
The front-end submission is working properly in the templates we tested it on, so this is a template issue.

This post will help you setup the front-end editing getk2.org/documentation/tips-a-tricks/201-allowing-users-to-submit-content

Now if the form still generates a PHP error, you need to remove the override for the itemform.php file so the default one can be used.

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

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

More
8 years 1 month ago #157008 by Randolph
Replied by Randolph on topic Item edit form not working
Hi Krikor,

please, don't get me wrong. I only repeated what the helix support team is saying about this. For ordinary users like me it's quite impossible to determine the cause for the malfunction, if it's related to K2 or Helix framework.

However, after some playing around I found out that the item edit / submission form works in conjunction with helix 3 framework, if "target window" in the menu item is set to "parent".

Setting target window to either "new window with navigation" or "new window without navigation" ends up with blank page and error message: "Call to a member function get() on null".

Hope this helps.

Regards
Randolph

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 month ago #157012 by Krikor Boghossian
Replied by Krikor Boghossian on topic Item edit form not working
I was not judging you, I rarely even pass judgment on fellow devs, but use another extension is a terrible answer.

"Call to a member function get() on null". I think this is not the complete message, is there more to this message like the file that is producing the error and the line?

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

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

More
8 years 1 month ago - 8 years 1 month ago #157034 by Randolph
Replied by Randolph on topic Item edit form not working
Hi Krikor,

the error is displaying as follows:

imgur.com/tNODb0D

That's all. Error reporting doesn't show file or line of code causing the error.

Regards
Last edit: 8 years 1 month ago by Randolph.

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

  • Ruchika Nagarkar
  • Ruchika Nagarkar's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 month ago #157076 by Ruchika Nagarkar
Replied by Ruchika Nagarkar on topic Item edit form not working
Hi Krikor,

Thank you for your response. I agree with you regarding the issue. I tried with the link you provided and set the parameters accordingly. But still got the same error. And for error there is no other information except the screenshot provided by Randolph. As Randolph mentioned, when we set the target window option as "parent", then only it works fine. In edit item, though everything works fine. When I click the edit button, the form appears in popup but when I create a menu item of type item edit form, its throws an error.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 month ago #157084 by Krikor Boghossian
Replied by Krikor Boghossian on topic Item edit form not working
If you enable error reporting and set it to development, is the complete error showing up?

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

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

  • Ruchika Nagarkar
  • Ruchika Nagarkar's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 month ago - 8 years 1 month ago #157085 by Ruchika Nagarkar
Replied by Ruchika Nagarkar on topic Item edit form not working
No only that error appears. I think it is the template framework issue because I recently installed k2 in fresh joomla package and its working there.

but any idea why i can't select option 'parent' in target window parameter in menu type of k2 edit form? Here, i can only select new window option. I want the add article to appear in the menu page just as a normal joomla add article comes. Currently, it opens in new window.
Last edit: 8 years 1 month ago by Ruchika Nagarkar.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 month ago #157111 by Krikor Boghossian
Replied by Krikor Boghossian on topic Item edit form not working
If the fresh install is working as expected (which it should) then it is a template issue and it should be addressed by the template's developers.

The edit form will always open in a modal (or popup), you can actually bypass this behaviour by adding a wrapper (iframe) menu item to the editing URL.

The URL should be: http://WWW.YOUR_DOMAIN.COM/index.php?option=com_k2&view=item&layout=itemform&task=add

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