Forum Replies Created
-
AuthorPosts
-
Greg
ParticipantThanks. I see WP has filters for default content and some others, but not for meta. ๐ A bit hacky, but I got the desired result with some JS:
add_action( 'admin_footer', function() { ?> <script>jQuery(function($){ var $input1 = $('.post-new-php.post-type-staff_testimonial input[name="attributes[0][heading]"]'); if(!$input1.length) return; var $clone1 = $input1.closest('.rwmb-clone'); $clone1.siblings('.add-clone').click().click(); var $clones = $clone1.siblings('.rwmb-clone'); $input1.val('Position'); $clones.first().find('input[name^="attributes"]:first').val('Team Member'); $clones.last().find('input[name^="attributes"]:first').val('Location'); });</script>'; <?php } );Greg
ParticipantOk sure. The next time I work on the site, I'll set up a second staging site that illustrates the problem.
Greg
ParticipantI already was, and when that didn't do what I want, I changed it to a callback, and the callback does not update dynamically, so I can't use the builder per your other suggestion.
Greg
ParticipantThere are no error messages. The blocks just don't display on the front end or editor. WP_DEBUG is enabled. With SCRIPT_DEBUG enabled, there are no messages on the migrated site that are not also on the local site (all just jQuery deprecation notices).
Greg
ParticipantThanks. That is disappointing.
Greg
ParticipantThanks. It is too bad not to be able to use the editor ๐
Greg
ParticipantThis is getting really annoying. I'm about ready to uninstall Metabox and switch to ACF. Under active development, I need to push changes from dev to staging frequently, and it's frustrating having to go in to each field group and re-save it.
Greg
ParticipantThe problem happens when the database is copied and the site url changes. This happens whether I do the database migration manually or using a plugin. Export from localhost, import to staging server, search and replace the url. The custom block does not work on the front end or back end. It doesn't matter whether I use the Better Search Replace plugin or the search and replace tool from interconnect/it.
Greg
ParticipantLong Nguyen, a staging or dev site is a duplication of a site, where all the files and database are copied over. After making changes, a staging site can be "pushed to production" on most platforms, where the database and files are copied back to the public site. Exporting and importing MB settings would be redundant to this process, and also quite a lot of hassle.
I'm wondering why MB requires me to go into the group and hit the Update button, just to work again after moving between dev/staging/production. This doesn't happen with ACF or most other plugins.
-
AuthorPosts