Loading...
 
Skip to main content

Export Profiles tab

Related Topics

1.1. Using Tiki user interface

1.1.1. Preferences in Control Panel 'Profiles'

Overview
Use this tab to create a new profile by exporting your site's current configuration
To Access
From the Profiles Admin page, click the Exports tab.
Note
Refer to http://profiles.tiki.org for details on extending the exported YAML

Admin: Profiles, Export tab
Export tab
Setting Description Default
Object Type Select the Tiki objects from the existing site to export Preferences
Export modified preferences as YAML Use this section to filter or select specific objects to export ot YAML
Unable to load the jQuery Sortable Tables feature.



1.1.2. Tracker definitions and tracker fields

You can do so in Tracker Export and select the last option to export as yaml code for tiki profiles.

1.2. Using command line tools (php console.php)

Available from Tiki12. Unlike the earlier tools to export as profiles, the command line tools, such as Console, cover the entire workflow of profile creation and perform better reference tracking between objects, allowing to create profiles that are more complete out of the box.

These early screencasts explain how the process works. The program tiki in the first video is a shortcut for php console.php in Tiki's root.

Something might be wrong with the second video and you can see a green screen only.

1.2.1. Overview of profile:export

Process overview:

  1. php console.php profile:export:init Some_Profile_Name
    • Create a blank profile
  2. php console.php profile:export:recent-changes --since "2 week ago"
    • Note: Use a timespan appropriate to the duration of your work
      This command reports the changes found, but does not export those changes to the new .wiki files yet.
  3. php console.php profile:export:tracker, php console.php profile:export:wiki-page, ... to include objects in your profile
    • If you repeat the recent changes step, objects you added will be removed from the list
  4. php console.php profile:export:finalize
    • If some references are unresolved, suggestions will be proposed, including adding references to previously installed profiles.


If you are within a MultiTiki instance, you need to append the extra param --site=site1.example.com, so that tiki knows which tiki should search the objects in (site1.example.com in this example), among all the instances within the same multitiki installation (site2.example.com, site3.foo, site4.bar, ...).

1.2.2. Exportable tiki objects

Copy to clipboard
profile:export:activity-rule-set profile:export:activity-stream-rule profile:export:all-modules profile:export:article profile:export:article-topic profile:export:article-type profile:export:category profile:export:file-gallery profile:export:forum profile:export:goal profile:export:goal-set profile:export:group profile:export:include-profile profile:export:menu profile:export:module profile:export:preference profile:export:rating-config profile:export:rating-config-set profile:export:recent-changes profile:export:rss profile:export:tracker profile:export:tracker-field profile:export:wiki-page

1.2.3. Export of tracker items

Since Tiki18 it is also possible to export tracker items, defining one tracker and filter a list of items (optional) and a list of fields (optional).

1.2.4. How to apply the local profile elsewhere

If you want to install this profile elsewhere, copy the local profile (usually from folder ./profiles), place it at the new server or new tikiroot path, and execute in the terminal at the tikiroot path:

Command
Copy to clipboard
php console.php profile:apply Some_Profile_Name file://profiles


Tip: in Windows OS you also need to use this syntax "file://profiles" (and not "file:\\profiles").

See Local profiles

1.2.5. Examples

Profile creation that include an empty tracker and wiki pages.

Using the following will create a profile with the tracker Id 1 (empty from items) and the 2 Wiki pages (homepage and contact-)

Profile creation
Copy to clipboard
php console.php profile:export:init Contacts php console.php profile:export:tracker --reference name 1 php console.php profile:export:wiki-page homepage php console.php profile:export:wiki-page contact- php console.php profile:export:finalize


To apply this profile on a different tiki, you have to copy the profile folder ("Contacts" in that example) from within the "profiles" directory from your Tiki source (where you created the profile) and to place it in the "profiles" folder of your Tiki destination.

Once it is done (and permission set according to your setup) use the following command to apply it.

Profile installation + re-indexing
Copy to clipboard
php console.php profile:apply Contacts file://profiles php console.php i:r

Profile creation that include a tracker, the tracker items and a wiki page.

Using the following will create a profile with the tracker Id 1 with all the items plus one Wiki pages (homepage)

Profile creation
Copy to clipboard
php console.php profile:export:init Contacts php console.php profile:export:tracker --reference name 1 php console.php profile:export:tracker-item 1 php console.php profile:export:wiki-page homepage php console.php profile:export:finalize


To apply this profile on a different tiki, you have to copy the profile folder ("Contacts" in that example) from within the "profiles" directory from your Tiki source (where you created the profile) and to place it in the "profiles" folder of your Tiki destination.

Once it is done (and permission set according to your setup) use the following command to apply it.

Profile installation + re-indexing
Copy to clipboard
php console.php profile:apply Contacts file://profiles php console.php i:r

1.2.6. Advanced usage

In some cases, you may have used some custom jquery code in wiki pages or in tracker fields of type 'static text', with hardcoded references to tracker ids, tracker field ids, or category ids, and those numbers are not renamed by default to the corresponding profile reference for that tiki object, since that a complex case to handle properly. A compromise for such cases has been added so that if you add some extra comment at the end of the line indicating that the preceding line has some value to be replaced by the corresponding profile reference, Tiki will do so for you.

That means that the profile exporter will catch the lines within jquery code in which the user has added a specific comment as a flag for tiki to do a replacement there in these three cases:

Copy to clipboard
javascript-code // profile_reference=tracker javascript-code // profile_reference=tracker_field javascript-code // profile_reference=category


Examples:

Copy to clipboard
trackerId: 13, // profile_reference=tracker var user_fields = ['230', '302', '303']; // profile_reference=tracker_field $("select[name='ins_160[]']").val("26").trigger('chosen:updated').parents(".form-group").hide(); // profile_reference=category


In fact, we support any profile reference already implemented such as wiki_page (other than just tracker, tracker_field and category). The full list is in lib/core/Tiki/Profile/InstallHandler dir, which is documented online also here:
https://profiles.tiki.org/Handlers

Related

alias

Profile Export | Profile Symbols | ProfileSymbols | profileexport | localprofile | localprofiles | Profile Export | ProfileExport