This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Tags Lost in 3.1.1

Tags: None
(comma "," separated)
User avatar
IvanX507
Registered Member
Posts
18
Karma
0
OS

Tags Lost in 3.1.1

Sat Dec 17, 2016 7:35 pm
Hi, i clean up my krita installation and now i only have 4 tags.
All the rest are gone.
I reinstalled krita for is if this fix it but didn't worked.
User avatar
ChameleonScales
Registered Member
Posts
104
Karma
1
OS

Re: Tags Lost in 3.1.1

Sun Dec 18, 2016 1:45 pm
I also lost tags since 3.1, or more precisely lost most tagged brushes. Only five tags have brushes in them (namely sketch, paint, ink, demo and Favorite Presets). I still have the 3.0 appimage and this one has all the brushes. Maybe the cause is similar for the both of us .
specs :
Linux Mint 18 Sarah x64, krita-3.1.1-x86_64.appimage

Last edited by ChameleonScales on Sun Dec 18, 2016 7:28 pm, edited 2 times in total.
User avatar
TheraHedwig
KDE Developer
Posts
1794
Karma
10
OS

Re: Tags Lost in 3.1.1

Sun Dec 18, 2016 1:53 pm
We changed the default tags. Your regular tags shouldn't have been touched unless you deleted the tags.xml in the resources folder.
User avatar
ChameleonScales
Registered Member
Posts
104
Karma
1
OS

Re: Tags Lost in 3.1.1

Sun Dec 18, 2016 2:02 pm
I edited my post while you were answering. But I didn't delete any xml file, where would it be located if I use the appimage ? Also my 3.0 appimage has them all in place, so are you sure it's not a bug ? I really just downloaded 3.1, opened it and didn't see any brush when right-clicking.
User avatar
TheraHedwig
KDE Developer
Posts
1794
Karma
10
OS

Re: Tags Lost in 3.1.1

Sun Dec 18, 2016 2:12 pm
gamnamno wrote:I edited my post while you were answering. But I didn't delete any xml file, where would it be located if I use the appimage ? Also my 3.0 appimage has them all in place, so are you sure it's not a bug ? I really just downloaded 3.1, opened it and didn't see any brush when right-clicking.

Check the resources folder under either settings->manage resources->open resource folder, or just open HOME/.local/share/krita
There's a tags folder there, within it, a tag.xml. That's what keeps your tags. If there's anything funny with that(namely, tags being there but not in 3.1), report a bug, if not then you must be confused about the default tags.
User avatar
ChameleonScales
Registered Member
Posts
104
Karma
1
OS

Re: Tags Lost in 3.1.1

Sun Dec 18, 2016 6:45 pm
This what I have in there :
kis_brushes_tags.xml
kis_paintoppresets_tags.xml
kis_taskset_tags.xml
kis_workspaces_tags.xml
ko_gradients_tags.xml
ko_palettes_tags.xml
ko_patterns_tags.xml
psd_layer_style_collections_tags.xml
User avatar
IvanX507
Registered Member
Posts
18
Karma
0
OS

Re: Tags Lost in 3.1.1

Tue Dec 20, 2016 8:58 pm
TheraHedwig wrote:
gamnamno wrote:I edited my post while you were answering. But I didn't delete any xml file, where would it be located if I use the appimage ? Also my 3.0 appimage has them all in place, so are you sure it's not a bug ? I really just downloaded 3.1, opened it and didn't see any brush when right-clicking.

Check the resources folder under either settings->manage resources->open resource folder, or just open HOME/.local/share/krita
There's a tags folder there, within it, a tag.xml. That's what keeps your tags. If there's anything funny with that(namely, tags being there but not in 3.1), report a bug, if not then you must be confused about the default tags.


http://imgur.com/a/gYR5A
I only have this files.
I have the deevad brush set.
User avatar
TheraHedwig
KDE Developer
Posts
1794
Karma
10
OS

Re: Tags Lost in 3.1.1

Tue Dec 20, 2016 9:12 pm
I was actually meaning what is inside the XML files. You can just open them in notepad. My suspicion is that these were default tags that we changed, and not custom ones. If these were custom tags, report a bug at bugs.kde.org.
donnieb
Registered Member
Posts
14
Karma
0
OS

Re: Tags Lost in 3.1.1

Wed Dec 21, 2016 5:44 pm
I have the same issue all the brush tags have vanished except for the tags for Deevad's brushes I assume because they come from the package itself.

All my xml files are empty except for the Deevad tags. This is on windows.

Will deleting the xml files force krita to rebuild them?


Surface Pro (1st Generation) - Windows 10
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Tags Lost in 3.1.1

Wed Dec 21, 2016 5:50 pm
Hm... I think this is a side-effect of Timothee cleaning up the default set of tags. I'm not sure we actually got the right balance there now, because I certainly miss being able to get a set of erasers or pencils.
User avatar
ocumo
Registered Member
Posts
16
Karma
0
OS

Re: Tags Lost in 3.1.1 - WORKAROUND

Thu Jan 26, 2017 12:47 am
I confirm that custom tags disappear in 3.1.1 .
The relevant file (.local/share/krita/tags/kis_paintoppresets_tags.xml) which is modified when we create a tag, is (_sometimes_, and not clear under which conditions) overwritten as soon as we close Krita, --as if it'd be part of the "destroy" process--. So, when that happens, the file is automatically replaced by a "purged" version that doesn't contain custom tags. This is obviously bad and in fact, a big show stopper. Actually I am writing this after having been burned once again by this erratic behaviour, while working on an project in Krita, so I quit the program and got to this thread.

WORKAROUND

So I came up with this workaround:

1. Backup a "good" .local/share/krita/tags/kis_paintoppresets_tags.xml (i.e., containing the tags you created): make sure it contains your tags, which means: if you created a tag e.g. "MyTag", the file should contain the string: <tag>MyTag</tag>
If Krita is still open when you are checking the file, make sure to backup the file while Krita is running, to avoid that Krita destroys it when closing.

2. Next time you want to use Krita, BEFORE running Krita, go ahead and copy your backup file to .local/share/krita/tags/kis_paintoppresets_tags.xml, overwriting the existing one in there.

3. Run Krita, open your artwork and your tags should now be visible in the Brush Presets dropdown menu. (Of course, you will have to repeat steps 2 and 3 for every session with Krita !! --> you may want to script that.... see below)
DONE.

BASH SCRIPT

Of course, those who know a bit of bash or just basics of Linux command line, can make a quick script to easy their lives. I have written the following bash script which is what keeps me now working without cursing so much and so high.

DO note the following:

1. You MUST edit the script to have the correct full path for the krita executable in your system. In my system, I have it in /opt/krita/krita, and it's actually a symbolic link. So please check the value of the KRITA_EXECUTABLE constant in line 18 below.

2. Of course, if you create new tags in your session with Krita, you then MUST backup the updated .local/share/krita/tags/kis_paintoppresets_tags.xml before closing Krita, to avoid loosing your changes.

3. The script collects krita's stdout and sterr messages in /tmp/krita_output.log and /tmp/krita_error.log, in case you need those. They always show interesting things. Of course, you may change the location of those files, in the script.

I hope this can help others to keep their sanity.

Here is how to use it:

KritaWithMyTags
Run Krita after replacing tags file with passed known good tags file

Usage:
krita_with_my_tags.sh [-h|--help] [FILE]

FILE is the full path of a VALID Krita tags file, that will be used to replace the existing kis_paintoppresets_tags.xml
With no FILE, this help is displayed.

-h, --help display this help and exit


IMPORTANT: You may need to edit this script to enter the full path of krita's executable. The script will issue error message with details if necessary. Default value in the script is "/opt/krita/krita".

Usage example:
To run Krita using a backup tags file:

Code: Select all
 krita_with_my_tags.sh  /path/to/my_backup_tags_file/kis_paintoppresets_tags.xml


Note that the backup tags file can have any name, as long as it has valid contents.

So: Save the following script with the name krita_with_my_tags.sh and enjoy it.

Edit: (28.01.2017) Fixed typo in script (wrong tag filename)

krita_with_my_tags.sh
Code: Select all
#! /bin/bash

# KritaWithMyTags
#
# Run Krita after replacing bad tags file with known good tags file
# Copyright (C) 2017 Ocumo
#
# Usage:
#     krita_with_my_tags.sh FILE
# where FILE is the full path of a valid Krita tags file
#
# License GPLv3+: GNU GPL version 3 or later
# <http://gnu.org/licenses/gpl.html>.
# This is free software: you are free to change and redistribute it.
# There is NO WARRANTY, to the extent permitted by law.

### Enter here the full path to the krita executable in your system ###
KRITA_EXECUTABLE="/opt/krita/krita"

# Other constants
KRITA_RES_DIR="$HOME/.local/share/krita/tags/"
TAG_FILENAME="kis_paintoppresets_tags.xml"
PROG_NAME=$(basename "$0" 2>/dev/null) || PROG_NAME="$0"
ERRORLOGFILE="/tmp/krita_error.log"
OUTPUTLOGFILE="/tmp/krita_output.log"

function show_usage() {
    cat <<_EOF
Krita with my tags
Run Krita after replacing tags file with passed known good tags file

Usage:
    $PROG_NAME [-h|--help] [FILE]

 FILE is the full path of a VALID Krita tags file, that will be used to
 replace the existing $TAG_FILENAME.
 With no FILE, this help is displayed.

     -h, --help    display this help and exit

IMPORTANT: You may need to edit this script to enter the full path of
krita's executable. The script will issue error message with details if
necessary. Default value in the script is "/opt/krita/krita".

Usage example:
    To run Krita using a backup tags file:
    $PROG_NAME /path/to/my_backup_tags_file/$TAG_FILENAME

    Note that the backup tags file can have any name, as long as it has
    valid contents.

_EOF
}

function die() {
    echo -e "\nError: $@\n\n" >&2
    exit 1
}

function check_help_invoked() {
  # This function MUST receive the global $1 variable as argument
  if [[ "_$1" == "_-h" || "_$1" == "_--help" ]]; then
    show_usage
    exit 1
  fi
}

function check_krita_exe_exists() {
    [ -f "$KRITA_EXECUTABLE" ] || \
      die "The path to Krita executable in the script is not configured.\n"\
      "Please edit the $PROG_NAME script and enter the correct path to\n"\
      "the krita executable in your system.\n The variable to change is"\
      " KRITA_EXECUTABLE.\n Save the script with the right path and try"\
      " again."
}

function check_arg() {
    if [ ! -f "$1" ]; then
        show_usage
        die "Missing or wrong FILE argument." >&2
    fi
    file "$1" | grep 'XML 1.0 document' >/dev/null || \
      die "The passed file is not an XML document. Wrong file."
}

function check_krita_running() {
    # Krita must not be running; die if it is.
    proc="$(pidof krita)"
    [ -n "$proc" ] && die "Krita is currently running (pid: $proc):\n" \
    "Please quit Krita and try again."
}

### Main

check_help_invoked "$1"
check_arg "$1"
check_krita_exe_exists
check_krita_running
cp "$1" "$KRITA_RES_DIR$TAG_FILENAME"
echo -e "Krita's log files will be in $ERRORLOGFILE and $OUTPUTLOGFILE"\
"\n\n--> Launching Krita with passed tags file, please wait...\n"
# Run Krita
"$KRITA_EXECUTABLE" 1>$OUTPUTLOGFILE 2>$ERRORLOGFILE &
exit 0


Last edited by ocumo on Mon Jan 30, 2017 10:06 pm, edited 1 time in total.
User avatar
ocumo
Registered Member
Posts
16
Karma
0
OS

Re: Tags Lost in 3.1.1

Sat Jan 28, 2017 2:04 am
Please note that I have edited the KritaWithMyTags script (previous post) to fix a bad tag name. So the script is now fixed, about 26 hours after the original post. The typo did not create any harm, it just saved the tag file with an useless name "kis_topaintoppresets_tags.xml" instead of "kis_paintoppresets_tags.xml", so running the script would not produce any good or bad outcome, other than the extra useless tags file.

If anyone did use the script in the past 24 hours or so, please just delete the useless file. The script is now correct and working, and it's identical to the original I am using in my system successfully.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]