I'm missing something -- I'd like to recreate all the Quicktabs I've created on a dev site on the production site. Export is great, but how to import?
great module by the way!
| Comment | File | Size | Author |
|---|---|---|---|
| #29 | import-quicktabs-1263706-29.patch | 3.89 KB | Pablo Gosse |
Comments
Comment #1
katbailey commentedWell, normally you would export them to code - in an implementation of hook_quicktabs_default_quicktabs - then they would automatically get picked up on your production environment. However, I realise this is an oversight as some people will just want to be able to import them directly to the database. Changing this to a feature request for that functionality, though I can't promise I'll get around to it myself any time soon :-/
Comment #2
jami3z commented+ 1
im in version 7 though. But yeah the usual "export" feature that other modules provide is usually so you can then "import" it to recreate it somewhere else. great for this module if it can use that same concept.
Comment #3
pasqualleComment #4
pasquallethis should work
Comment #5
zloutenka commentedHi, I applied the patch successfully, but was unable to import a quicktab instance.
Somehow, the $quicktabs object doesn't pass properly and quicktabs_import_form_validate() throws an error.
the text I'm trying to import is attached as a txt file
Comment #6
pasqualletry to remove
from the end.
note: the quicktabs export is wrong, as it should not contain the $items array.. (new issue)
Comment #7
pasquallethe new issue: #1379034: remove the items array from export
Comment #8
zloutenka commentedUnfortunately, removing
return $itemsdidn't help, nor did removing the rest of $items's occurancies.Comment #9
vadim.hirbu commentedHi, i applied the patch (1263706-Import-quicktabs.patch) successfully.
It's working for me.
Exporting and importing works fine.
Comment #10
vrajak@gmail.com commentedThis is all great for D7, what about the D6 version? Any chance for a patch there? Many thanks.
Comment #11
aiphesis this committed to dev ?
is it possible to import/export quicktabs between D6 to D7 website ? if not does exist a solution ?
thanks
Comment #12
mrgoodcheese commentedI applied the patch (1263706-Import-quicktabs.patch), and I see that the code is changed, but I don't see any difference within Quicktabs. Am I missing something? Where is it supposed to show the ability to import? When starting a new Quicktab?
Comment #13
ice70 commentedhi mrgoodcheese,
you'll have to clear the cache before the import link appears next the 'Add Quicktabs Instance' link
Pasqualle - nice one, thank you, the import patch seems to work a treat :)
Cheers
ice70
Comment #14
swfindlay commentedI'm using 7.x-3.6 and the code at 486 in quicktabs.admin.inc has changed (so the first chunk fails to patch).
Is there an update of this patch for 7.x-3.6?
Having taken a quick look at the code it's not clear (to me...a non-professional coder) how to integrate the patch.
Sorry if this is a really basic question.
Comment #15
docans commentedI am also looking for how i can import quicktabs from my dev to production site. But i cant find the import link. Any help
Comment #16
Pablo Gosse commentedAfter an upgrade from 7.x-3.4 I've encountered the same issue using 7.x-3.6. I just updated the code and tested and it appears to be working fine. I'll roll a patch and post here later today.
Comment #17
Pablo Gosse commentedUpdating status and assigning to myself.
Comment #18
Pablo Gosse commentedAn updated patch that works against 7.x-3.6 and 7.x-3.x-dev is attached. Could people please review and test?
Hopefully this can get committed to the next stable release and to dev. This functionality is critical to us as we have non-technical users who administer our Drupal site and need to be able to export/import quicktabs instances through the dev-qa-prod chain.
The patch is in p1 format, but we are a Mercurial shop, so I hope it will work against Git. If not, please let me know and I'll set up a Git environment and roll a new patch.
Comment #19
Pablo Gosse commentedUpdating to unassigned to reflect updated Needs Review status. Apologies for the extra post. Should have made that change when uploading the patch.
Comment #21
Pablo Gosse commentedSincere apologies for the last patch. I inadvertently replaced some code that had changed in 7.x-3.6. I've removed the offending code and updated the patch. I've tested against 7.x-3.6 and it works and the exception that the testing caught should now pass.
I've not tested this patch directly against 7.x-3.x-dev but I just did a diff of the patched 7.x-3.6 and the only differences in quicktabs.admin.inc and quicktabs.module are the code to enable the import.
Pablo
Comment #22
liquidcms commentedtested. seems to work. thanks. :)
let's get this committed.
Comment #24
ultimateboy commentedJust read through the code, still need to test, but I won't commit with the whitespace issues. Also, I'd like to see function descriptions with the added functions.
Please refer to https://www.drupal.org/coding-standards if you have any questions about coding/whitespace standards.
Comment #25
Pablo Gosse commentedThx for the feedback @ultimateboy. I will take care of that next week and submit an updated patch. I assume the Coder module will help identify these issues? I've just recently started submitting patches so will install it and see the feedback it provides.
Thanks,
Pablo
Comment #26
Pablo Gosse commentedComment #27
ultimateboy commentedYes, coder should help you find these.
The biggest whitespace issue that stands out is the use of tabs instead of 2 spaces for indentation. Should be a pretty fast and easy fix.
Looking forward to committing your patch!
Comment #28
Pablo Gosse commentedCoder via drush is freaking awesome :-)
Updated patch with whitespace issues resolved is attached. Tested against 7.x-3.6 and 7.x-3.x-dev. Lots of other issues reported by coder in the updated files, but code affected by this patch is okay as far as I can see (other than one warning about a comment exceeding proper line length).
Thanks for reviewing!
Pablo
Comment #29
Pablo Gosse commentedI had actually submitted another patch to allow overwriting of existing quicktabs on import, but it was failing. I now realize that it was failing because it was attempting to be applied against branches which didn't have code from the previous import patches already applied to it.
I hope it's acceptable that I'm uploading an updated version of the patch from this issue which now contains the code originally in the patch found here
https://www.drupal.org/node/2289383. I'm going to close that issue and include a link to this issue.@ultimateboy, if you could take a look and review that would be much appreciated!
Cheers,
Pablo
Comment #30
dcutri commentedHow exactly does one implement a patch?
Comment #31
Pablo Gosse commentedhttps://www.drupal.org/patch/apply
Comment #32
Pablo Gosse commentedComment #33
agrozyme commentedwe can use features for import.
Add this function in quicktabs.module
Comment #34
nitesh sethia commentedThe patch (#1263706: Import quicktabs) works as expected.
It gives you an option to import the Quicktab settings directly.
So changing the status to RTBC.
Comment #35
bgelhard commentedThanks to all for implementing this patch. I've successfully applied it, but I still don't see anyway to import a quicktab. Once the patch is applied, what would the procedure be?
Thanks, Barbara
Comment #36
Pablo Gosse commentedHi Barbara. If the patch applied successfully you should see a link with the text 'Import' next to the 'Add Quicktabs Instance' link. Are you not seeing this?
What version of Quicktabs are you running?
Cheers,
Pablo
Comment #37
bgelhard commentedThanks for your reply and sorry I didn't notice sooner. I am using version 7.x-3.x-dev. I don't see that link next to the link to add a new instance.
Thanks again, Barbara
Comment #38
caspervoogt commentedpatch from https://www.drupal.org/node/1263706#comment-8961325 looks RTBC from my end. Works.
Comment #39
Pablo Gosse commentedHi Barbara. Sorry for the delayed reply. Were you ever able to get the import functionality working?
Pablo
Comment #40
Jeroen94 commentedIt would be lovely if the working patch is ever committed. Go maintainers!
Comment #41
nwom commented#29 worked perfectly and applied cleanly. Thank you!
Comment #42
nwom commentedComment #43
drupal-son commentedPatch #29 applied cleanly to latest 7.x-3.8 version.
CC All was needed to make the Import link visible.
This should be committed to Master branch.
Thanks.
Comment #44
nwom commentedStill applies cleanly to newest dev.
Comment #45
capysara commented