Help:Upgrading from 0.7 to 1.0

From semantic-mediawiki.org
Jump to: navigation, search


This page contains outdated information and is thus OBSOLETE!
Please use this page instead: Help:Upgrading from 0.7 to 1.0
This documentation page applies to all SMW versions from 0.7 to 0.7.
     

Help:Upgrading from 0.7 to 1.0 en 0.7 0.7


The INSTALL document in the SMW download describes how to upgrade from SMW 0.7 to SMW 1.0.

This page lists some of the changes between the two versions.

Contents

Before upgrading

During upgrade

  1. See the INSTALL document.
  2. Run the SMW_unifyProperties.php script. This will move all non-overlapping relation pages to the property-namespace
  3. Run the SMW_refreshData.php script with -p option, then again.

Fallout from Relation and Attribute unified to Property

Help:Properties and types describes property, and its section "Relations" and "Attributes" in earlier versions describes the specific change.

Attributes and relations become properties, in a single Property namespace.

This is a big change, but because

your Wiki will work pretty well immediately after the upgrade!

The visible changes after upgrading include:

Fixing up former relations and attributes

aliased names

Aliased Types

Type:Integer and Type:Float are aliases for the new datatype Number. Pages using the old types should continue to work, but the code makes no distinction between whole numbers and floating-point numbers.

URI is an alias for URL.

Type:Enumeration is an alias for the Type:String, since the special property allows value can apply to any property.

(Type:Enumeration may return as a separate type in a future version of SMW to permit further control over enumaration order and display.)

Display units

The special property Display Unit is an alias for the new special property Display units. The latter is new and takes a comma-separated list of units. When used on property pages that have a datatype that supports units, the effect is that all printouts will show the values only in the given units, and only in that order. This makes the special property "main display unit" obsolete, since this was just a way of encoding the first of the display units.

You need to find all pages with Property:Main display unit and remove this special property, adding the primary unit to the front of a list of display units. For example, if Property:Weight used to have

[[Main display unit:=kg]] and [[Display unit:=lbs]]

after upgrading weights will only appear in lbs. You need to replace this with

[[display units::kg, lbs]]

English names and localization

In previous SMW versions, if your wiki used a language other than English, you had to use the localized names, for example [[Hat Datentyp::Datentyp:Zeichenkette]] instead of [[Has type::Type:String]]. Now the English labels are allowed in all languages. It's possible this new feature may introduce a conflict with existing page and namespace names in your Wiki.

Other changes

Many error strings are replaced with a yellow triangular caution icon, which pops up the error text when clicked.

Allows value

Property:allows value can apply to any property. In previous SMW versions using allows_value for a property of some type besides Type:Enumeration would have no effect, now it does.

Missing pages

As remarked elsewhere, Special:Attributes, Special:Relations are gone, replaced by the unified Special:Properties.

Special:SearchTriple is gone, replaced by Special:SearchByProperty.

Inline query changes

double brackets always required

In SMW 0.7 it seems you could use a "naked" page name, or more likely the template variable ( {{PAGENAME}} or {{FULLPAGENAME}}, in an inline query. In SMW 1.0pre-alpha3 you must wrap the pagename with double brackets. For example, if you showed properties for items in a category on a category page with

<ask>{{FULLPAGENAME}}[[located in::*]]</ask>

you must use

<ask>[[{{FULLPAGENAME}}]][[located in::*]]</ask>

default query is a list

Inline queries used to appear as a table by default. In SMW 1.0, you just get a comma-separated list. To ensure a table, add format="table" inside the <ask> tag.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox