backdrop-contrib / paragraphs

Paragraphs module to control your content flow
https://backdropcms.org/project/paragraphs
GNU General Public License v2.0
5 stars 11 forks source link

Error when adding field to bundle #6

Closed herbdool closed 6 years ago

herbdool commented 6 years ago

I added a paragraph bundle and added a file field. I got this error:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'paragraphs_bundle_title_callback' not found or invalid function name in _menu_item_localize() (line 754 of /app/core/includes/menu.inc).

herbdool commented 6 years ago

Then when I add this bundle to the page content type I get these errors:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'element_validate_integer_positive' not found or invalid function name in _form_validate() (line 1483 of /app/core/includes/form.inc). Warning: uasort() expects parameter 2 to be a valid callback, function 'backdrop_sort_weight' not found or invalid function name in paragraphs_bundle_settings_form_submit() (line 465 of /app/modules/paragraphs/paragraphs.module).

laryn commented 6 years ago

@herbdool Are you still seeing these errors?

herbdool commented 6 years ago

Yes, but I should probably also test on a fresh site. Are you seeing these errors too?

herbdool commented 6 years ago

I see the errors on a new site as well.

herbdool commented 6 years ago

For the last error regarding backdrop_sort_weight this needs to be converted to the new format as per https://api.backdropcms.org/node/41649

laryn commented 6 years ago

@herbdool Yes, I just tested and see the errors.

herbdool commented 6 years ago

The title callback error is odd. The function can't be found in paragraphs.admin.inc. If I put it in the .module file it works. However, in Drupal 7 the function is in paragraphs.admin.inc. Not sure if we should bother try to debug this further. My PR resolves the issue at any rate https://github.com/backdrop-contrib/paragraphs/pull/20.

laryn commented 6 years ago

@herbdool Nice work! Agreed, that title callback issue seems strange but probably not worth a lot of additional time.

I just tested and I'm still seeing the other error when adding a paragraph field to a content type:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'element_validate_integer_positive' not found or invalid function name in _form_validate() (line 1483 of /app/www/core/includes/form.inc).

I'll merge the two existing PRs but leave this issue open until we figure that last error out.

laryn commented 6 years ago

I think we've taken care of these. Thanks @herbdool!