Header solution possible?

Hi, this may not be technically possible but would be great if could be modified to work.

I know this edits just the page/post content but I was just trying something with Headway, in which I can set various layouts, eg header,content, footer. Now I would often use a sidebar as the header in HW so I can drop widgets into that and have any features I want in the header.

I can also set the header to pull from a content area, but then set that to be a specific page content area, so content in the header from a page called header for example. The main content area being set to be the normal post edit content.

That allows a lot of flexibilty for layout. I was trying that to see if in this example the Header page content once edited with your builder would display on a regular page along with the builder activated, but that does not show any content created by the builder in that Header page, just whatever is in the normal edit content area.

I guess that could cause some kind of conflict with loops or something? Probably it cannot display the output of two builder created contents on the same page?

I may not have explained this well enough but if there is any way to make that work then it would allow the builder to design the header and the footer as well as the page content.

With HW I can have unlimited page layouts too and apply them to any pages so the possibilities would be endless and the design so much easier with Builder.

Thought worth asking anyway. Just working on localhost at the moment so cannot show example but can upload if you think there might be a way to make it work or do not understand what I am on about.

Neil

Hey Neil! Thanks for the kind words and your feedback. This is a really interesting idea.

I guess that could cause some kind of conflict with loops or something? Probably it cannot display the output of two builder created contents on the same page?

I believe you’re right that both builders are going to be attempting to take over the main loop. We would probably need to check out how Headway is injecting the other page’s content into the header. I’ll chat with Justin, our lead developer, about this because I am curious on his thoughts. He’ll have a better understanding of what’s happening.

The idea is very cool though, we get a lot of requests from folks that want to use the page builder to modify their header/footer. This seems like relatively simple way to implement that kind of functionality!

Thanks Robby would be great if possible, will look forward to hearing what Justin thinks.

Do you have access to a Headway site to test out? If not let me know and I can upload a test site with HW and Beaver installed and send you a login if that might help.

Hi Neil, we had a chance to chat about this this morning. If you wouldn’t mind setting up a test site for us, that would be awesome!

Quickly though, before we get into the test site, you could try adding the header/footer page ids to the fl_builder_global_posts filter. This filter will load the assets needed to render any page that you provide the ID for. We set this up for someone that wanted to use a builder page as a global sidebar (similarly to how you’re trying to use a builder page as a global header):

http://forum.wpbeaverbuilder.com/page-builder-developer-documentation/

This might work, but there still might be a loop conflict with Headway. I wont’ be able to tell until we get into the test site. Let me know if you have any questions on that filter. Thanks Neil!

Thanks Robby. I did as suggested and the builder inserted content as a header is showing on the test now, so that is heading in the right direction.

Things is now it shows the edit boxes for that plus the actual page content when switching to Builder and any edits show in both places, ie add a new row with a text box and one shows above and one below.

I will upload a test site asap and let you have a look, should be close.

Hey Neil! I was checking in on support posts today and noticed this one is still open. Are you still having issues here? If possible, I would be curious to see the test site. Let me know =D – Thanks Neil!

Sorry for the delay Robby, got distracted by other stuff. I have uploaded the test site and will send on login details next as private reply.

[Content Hidden]

Sorry just checked on another pc and backupbuddy import failed to update urls so site not right yet, will sort that out asap

Hm, is there any known problem with migrating using backupbuddy? Just that BUB always works for me and this migration to live test site failed to update any of the urls for images in the Beaver Builder page layout. Not happened before, all images still showing localhost paths.

Where are the image urls stored in Builder, do you have a separate table in the database, cannot see one?

Well that was it. Backupbuddy failing to update the urls for Beaver held in serialized data in the postmeta table. BUB is capable of handling serialized data apparently so any reason you know of it failing in this?

Anyway I fixed that with a special script to update that data separately in the database table and all image urls are correct now so if you want to have a look as before with details above fire away.

I would like to know any possible solution to the url issue however as I don’t want to condute this additional operation again on an import to live server.

Ugh, that’s not good. Any chance you could zip up the BUB plugin and send it to me? Here’s my email: robby [at] fastlinemedia [dot] com. It’s funny, we just met Cory from iThemes (BUB) at WordCamp last weekend. We’ll make sure to give him a hard time if we can’t get it working =D

Any luck with looking into this?

Hi Neil! I haven’t had a chance to install BUB yet, but I was chatting with Justin about this problem. You’ll have to forgive me, I am not an expert on serialized data, but if I understand correctly we are nesting serialized arrays/objects within each other and this may be throwing off BUB. For now, I am afraid that using the interconnectit script might be the best option (I use that script for migrations too). Sorry for the inconvenience. This is on our bug list now, and we will look further into it, but I have a feeling this one may take some time to tackle.

Hi Neil,

I looked over the BUB database replace code (/lib/dbreplace/dbreplace.php) and it appears that they aren’t replacing strings in objects, only arrays. The issue appears to be in the method pluginbuddy_dbreplace::recursive_array_replace.

The builder stores its data as a serialized array of objects, so I believe that’s why BUB isn’t replacing the URLs.

Unfortunately, there isn’t much we can do here as the issue appears to be on their end. If you have an active account you could bring it up with them. I would be happy to help with a fix. Let me know.

Justin

Thanks Robby and Justin, I do have an active account with them so will let them know about this and see if they are able to address the issue and will also give them your contact details.

Hopefully it will not be too much to create a fix for this which would be great. The interconnectit solution was not that difficult to do as it turned out but Backupbuddy is a very easy migration tool and normally deals with everything seamlessly and is virtually a one click operation, also I believe the most used tool for backup and migration of wordpress sites, so would be a problem needing a solution such as interconnectit for an increasing number of users as your Builder becaomes more popular as it surely will.

Just to conclude this, iThemes support for Backupbuddy have added a solution to their next release of the importbuddy script which makes migration of Beaver Builder data work. I have a version of that which have tested and works so if anyone needs to use BUB to migrate before their next release let me know.

They did note that BB uses an unusual method of storing data which they have not seen before but that there was no harm in adding the extra code in case anyone else in the future used similar method.

Back to the start of this thread, has anyone from BB had a chance to look at the test site in respect of possible ability to use BB to design a header?

Hi Neil,

Thanks for the update. That’s great that they were willing to implement a fix for this! We’re storing data the recommended way (using the update_post_meta) function, so I’m not sure why they think that’s unusual, but either way I’m glad this has been resolved. Thanks for the help with that!

Justin

Hi Justin,
I don’t understand this at all but they refer to

“It looks like Builder Beaver is storing objects within the serialized arrays which BackupBuddy did not handle”

They say they had not seen another plugin use this form of data storage but anyway their update addressess this so all is well.

Hey Neil,

Thanks for the additional info. I’ll do some research to see if that’s a bad practice, but I don’t believe that it is.

Justin