8 Posts
HC
1 year ago
12
Topic

I created a very simple contact-form. 5 fields - a submit-button. after clicking the submit-botton:

0 Attempt to assign property "pk" on null

Get a Book for SEBLOD
693 Posts
rpoy
1 year ago
1
Level 1

Hi!

What version of Joomla and SEBLOD are you using?

What type of fields?

What are the user rights?

8 Posts
HC
1 year ago
0
Level 2

I use joomla 3.10.11 and seblod 3.23.1. The template is gantry 5.5.15
The problem has changed to:
I created a 6 page form. Configuration: stage 6. Each side 1 field and a next button.
The first page is displayed, click on next - the form stays on page 1 and does not change to page 2

1. Stage: textarea
2. Stage: radiofield
all other Stages: textfields 

Access: Public
Permissions: Public - create, edit, edit Own: Allowed

154 Posts
Hableur
1 year ago
7
Level 1

Hello, 

I had the same with J4 Seb4. Just adding catid in the form make it work. Don't know why.

12 Posts
FLUCKE
8 months ago
6
Level 2

Hello, I have the exact same problem since I upgraded to PHP 8.0, Seblod 4.x and Joomla 4.X. You say that the problem can be solved by putting “Catid” ... that's nice ... but where and what element should you modify? Thank you in advance for more concrete clarification!

154 Posts
Hableur
8 months ago
5
Level 3

Hello,

It was about a seblod form for article as content object, I first don't have catid like field in the form. Just adding field catid in the form  have solved the problem. Have you update with the new version of seblod ?

12 Posts
FLUCKE
8 months ago
4
Level 4

Good morning, Thank you for your prompt response. Yes Joomla and Seblod are up to date with the latest version. I'm going to see if I can add a "Catid" field...is it really a "Concatainer" field? What is surprising is that on the same site, I have another “Contact” tool, also made with SeBlod, which works perfectly!?!?

154 Posts
Hableur
8 months ago
3
Level 5

catid is a basic core field in article form. His name is Article Category Id, which correspond to #__content.catid

Yes, there are a lot things surprising now with J4S4. But it's on the way ti be corrected, I think.

12 Posts
FLUCKE
8 months ago
2
Level 6

Good morning, Thank you for your clarification. I looked in my form, there is indeed an “Article” > “JForm Category ID” field, but the error message still appears, no email copy is sent, however Joomla has an article which has was created by Seblod, on the content of the form...but empty...apart from the information linked to the article (Author, Category, Date, etc.)!?!? What is surprising is that not only did all this work under Joomla 3.x and SeBlod 3.x...and since the transition to versions 4.x, only this form no longer works. As mentioned in my other message, the 2nd form, dedicated to “Contact”, works perfectly!?!? For the moment, I cannot determine the cause of this problem. Thank you in advance for helping me out!

154 Posts
Hableur
8 months ago
1
Level 7

Sorry, but I can't help you any more. I have just discovered by chance that adding Article Category Id in my form resolve my problem, but I don't know why...

12 Posts
FLUCKE
8 months ago
0
Level 8

Good morning, ...thank you anyway for trying! I hope someone finds a solution to this problem and lets us know. For my part, I will continue looking.

85 Posts
yuberlin
1 year ago
0
Level 1

in my form i get the same error when switching to PHP 8. 

Error Message Attempt to assign property "pk" on null
Error File /my/path/libraries/cms/cck/plugin/location.php:245

This is line 245:
$config['storages'][static::$table]['_']->pk = static::$pk;

31 Posts
gzukry
22 days ago
0
Level 1

I just had this problem while doing a user profile form, with restrictions for admins to have some fields, but without the common profile field, and vice versa for registered/new users.

Message appears when an admin save, without having access to username/name/... user field on site view.

I added a "member_id" field in site view, with storage [standard][user][id], so [standard][content][id] in your case.

Plus : If I remember the doc, it sais multi stage forms are 1st saved at the end of 1st stage, then second stage is an edit of the existing content (don't forget to put "edit own" access to public if it's a public form), which have an ID (in those cases, "id" is the pk - primary key - ).

Don't know if you'll need an extra field whith [standard][content][catid] storage.

Good luck.

Get a Book for SEBLOD