Asset builder page won't allow new assets to be created

Apologies if this topic has already been answered but I've been unable to find any solution to my problem on the forum.

 

I want to allow users to create a standard page via an Asset Builder Page. It seems straightforward enough: set up the Asset Builder Page, define Standard Page as the asset type to create, apply a metadata schema, create a location for the newly created assets to live in, customise the Create Form using metadata keywords from the metadata schema, set up Required Attributes and customised error text. The finished Asset Builder Page looks fine, all the fields are there, but when I fill in the fields in the form and submit it, an error message pops up for every required attribute, whether I've filled in the field or not. I have applied the metaschema to the Location folder as well.

 

I've read through the manual at http://manuals.matrix.squizsuite.net/other-cms-assets/chapters/asset-builder-page but can't figure out where I'm going

 

We're using v4.12.2

When something like this happens I always just create another asset builder and see if the problem happens again. If not, then you are good to go!

Hi Nic, yes, already tried that, exactly the same behaviour with second attempt. Maybe some more info might alert you to something...

 

On the Asset Builder Page details screen I have the following settings:

  • Asset Types to Create: Standard Page
  • Create Status: Do not change status
  • Metadata Schemas to Apply: linking to a metaschema
  • Create Form Customisation: Standard Page, with Customise Create Form ticked

 

For the Standard Page Create Form Layout, I have this code...

 

<label for="metadata_field_select_109945">What category does your notice fall under?</label>%metadata-F_109945%<br /> <label for="metadata_field_text_109843_value">Short title for your notice</label>%metadata-F_109843%<br />
<label for="metadata_field_text_109844_value">A description of your notice</label>%metadata-F_109844%<br />
<label for="metadata_field_text_109845_value">Your name</label>%metadata-F_109845%<br />
<label for="metadata_field_text_109846_value">Your phone</label>%metadata-F_109846%<br />
<label for="metadata_field_text_109847_value">Your email</label>%metadata-F_109847%<br />
%commit_button%

It would be helpful that you put the screenshot here.

Hi Nic, yes, already tried that, exactly the same behaviour with second attempt. Maybe some more info might alert you to something...

 

On the Asset Builder Page details screen I have the following settings:

  • Asset Types to Create: Standard Page
  • Create Status: Do not change status
  • Metadata Schemas to Apply: linking to a metaschema
  • Create Form Customisation: Standard Page, with Customise Create Form ticked

 

For the Standard Page Create Form Layout, I have this code...

 

<label for="metadata_field_select_109945">What category does your notice fall under?</label>%metadata-F_109945%<br /> <label for="metadata_field_text_109843_value">Short title for your notice</label>%metadata-F_109843%<br />
<label for="metadata_field_text_109844_value">A description of your notice</label>%metadata-F_109844%<br />
<label for="metadata_field_text_109845_value">Your name</label>%metadata-F_109845%<br />
<label for="metadata_field_text_109846_value">Your phone</label>%metadata-F_109846%<br />
<label for="metadata_field_text_109847_value">Your email</label>%metadata-F_109847%<br />
%commit_button%

 

What about the keyword for the Standard Page's name?

Hi Nic, The manual for the Asset Builder Page says to use %details-F_title% for title, is that the keyword you're referring to? When I use that keyword, I get a blank on the frontend (nothing appears where you would expect a field). If I use %details-F_name%, then I get a field on the frontend, and when I submit the form, that is the only field that is accepted, all the metadata fields that I fill in get the error messages that I set up in Required Attributes.

Hi Nic, The manual for the Asset Builder Page says to use %details-F_title% for title, is that the keyword you're referring to? When I use that keyword, I get a blank on the frontend (nothing appears where you would expect a field). If I use %details-F_name%, then I get a field on the frontend, and when I submit the form, that is the only field that is accepted, all the metadata fields that I fill in get the error messages that I set up in Required Attributes.

 

You need to be using %details-F_name% for the page name. This is required.

 

If there are errors, metadata fields don't keep their submitted info. This is a bug that has been around forever.

 

If you remove the required field rules, what happens?

If you remove all the required attributes does it create the assets correctly?

 

If if the above scenario it creates the assets successfully, do all the values you have put into the fields get filled?

 

Is there a required field set up that you have not created as a field in the page bodycopy?

 

Also check the matrix error log to see if you get any different feedback in there (depending on your logging settings asset builder errors/warnings may or may not get logged).

Hi JP and Nic, thanks for getting back to me on this.

 

So it appears that the %details-F_name% is essential for the Asset Builder Page to be able to be submitted, yet the manual does not state this anywhere, and in the example used in the manual, %details-F_title% is used, which definitely doesn't work. Who should I contact about getting the manual updated?

 

If I remove all the required attributes in addition to using to the %details-F_name% keyword, it does indeed create the asset, but it strips out the metadata in the asset that is created! ie. when I look for the metadata in the Standard Page that gets created, the metadata fields all have (default) [EMPTY] next to them.

 

It only takes one required field to be set up to create an error when I submit the form.

 

I've had a look at the error log files but nothing there that I can relate to the Asset Builder problem

 

Could this be a bug? I still keep thinking it must be something I've missed or haven't done correctly. The manual is useful to a point, but if it's missing essential things like having to use the %details-F_name% keyword, there may be other things missing from it as well.

Could this be a bug? I still keep thinking it must be something I've missed or haven't done correctly. The manual is useful to a point, but if it's missing essential things like having to use the %details-F_name% keyword, there may be other things missing from it as well.

 

The manuals are really good at having the info that you need, but a few things get missed. Can you give me the link of the page that has the error?

 

At the top of that page you can click the submit a suggestion box, and let them know of the error.

Hi JP and Nic, thanks for getting back to me on this.

 

So it appears that the %details-F_name% is essential for the Asset Builder Page to be able to be submitted, yet the manual does not state this anywhere, and in the example used in the manual, %details-F_title% is used, which definitely doesn't work. Who should I contact about getting the manual updated?

 

If I remove all the required attributes in addition to using to the %details-F_name% keyword, it does indeed create the asset, but it strips out the metadata in the asset that is created! ie. when I look for the metadata in the Standard Page that gets created, the metadata fields all have (default) [EMPTY] next to them.

 

It only takes one required field to be set up to create an error when I submit the form.

 

I've had a look at the error log files but nothing there that I can relate to the Asset Builder problem

 

Could this be a bug? I still keep thinking it must be something I've missed or haven't done correctly. The manual is useful to a point, but if it's missing essential things like having to use the %details-F_name% keyword, there may be other things missing from it as well.

 

The %details-F_title% keyword would work when you're creating a file asset (as they have titles) but you're creating a standard page (which has a name, not a title). I'm not quite sure why things are set up this way, it's a bit confusing.

 

If the metadata values aren't being filled then that's probably why the required fields are preventing assets from being created. I'm afraid I'm not really sure why the metadata fields aren't getting filled though. Could you fire up firebug/whatever debugger you use and have a look at the POST information when you submit the form? There might be some clues in there.

On the frontend everything appears as it should, all the metadata fields are there and can be filled in no problem, and after I submit the form everythings appears to have gone smoothly, the Created bodycopy appears, etc, so using Firebug is not really helpful. There is no POST info, just the Created bodycopy text (see code below)

<div id="content_div_111265">
Your notice has been created.<br />
See it <a href="http://.../whats_happening/staff_notices/notices/another_test">here</a>
</div>

 

It's only when I go to check the created asset and look for the metadata that I find that none of the values that I put into the fields are there, they all have the (default) [EMPTY] next to them.

 

I think I'll post a bug report.

On the frontend everything appears as it should, all the metadata fields are there and can be filled in no problem, and after I submit the form everythings appears to have gone smoothly, the Created bodycopy appears, etc, so using Firebug is not really helpful. There is no POST info, just the Created bodycopy text (see code below)
<div id="content_div_111265">
Your notice has been created.<br />
See it <a href="http://.../whats_happening/staff_notices/notices/another_test">here</a>
</div>

 

It's only when I go to check the created asset and look for the metadata that I find that none of the values that I put into the fields are there, they all have the (default) [EMPTY] next to them.

 

I think I'll post a bug report.

 

And you applied the metadata schema on the details screen of the asset builder?

Yes, otherwise I'm guessing the fields wouldn't appear on the frontend?

Firebug will tell you the POST parameters that are being sent to the page (under the net tab, click the POST to the form url, then click the Params tab for that entry).

 

How about this - copy your customization out of the asset. Uncheck the use customization box, and try create an asset - see if it creates correctly with metadata, if so copy the post data from the submission out of firebug. If it doesn't create properly, then the issue is probably with your asset builder setup and not your customization.

 

If the asset creates successfully uncustomized, reapply your customization, submit the form again and compare the post data from your customization to the post data from the uncustomized form and see if there are any differences.

 

It's probably not a bug, it's just an arcane and somewhat unfriendly process setting up some of these assets the way you want them to work.

thanks JP, I haven't used that section of Firebug before. I can now verify that the values I put into the metadata fields have been captured at that level, below is what I found in the POST section, so that's looking promising. I'll try out your other suggestions to see if I can find out why they don't appear in the created asset.

 

AB_111257_ASSET_BUILDER_A...	create
AB_111257_ASSET_BUILDER_C...	page_standard
asset_action	create_custom
page_standard_0_397	Yet another test
metadata_field_select_109...	1
metadata_field_select_109...	Sell
metadata_field_text_10984...	test
metadata_field_text_10984...	etset
metadata_field_text_10984...	ewt
metadata_field_text_10984...	234
metadata_field_text_10984...	4

When I reverted to the uncustomised page, the frontend provides the metadata field names but not the input fields, it just has (default) next to the field name. So the problem is obviously not with the customisation. So that means I can't try any of the other things you suggested, because I can't even fill in the fields to submit the form (well, apart from the Page Name field).

Are you able to provide a temp account with access to this? I would be happy to look at it for you. PM me if you want.

I found the problem, sorry to have taken up your time on this! Each of the metadata fields was set to Editable: No. I changed them to Editable:Yes and it's all fine.

I found the problem, sorry to have taken up your time on this! Each of the metadata fields was set to Editable: No. I changed them to Editable:Yes and it's all fine.

 

Wonderful!