How can I rename a wiki page in Fossil SCM?
In my particular case, I'd like to rename my project (in Admin, Configuration, Project Name), but if I do that then when I click Home in the main menu nothing is displayed, because there's not yet a wiki page whose name matches my new Project Name. I'd like to rename my project, and rename my (sole) wiki page to match.
You can’t rename a wiki page, because wiki pages are identified by their name; that would be tantamount to deleting the old page. And you can’t delete a wiki page; Fossil never deletes an existing artifact.
But you can create a new wiki page (with your project's new name), and copy the old page's contents to the new one. If you remove all the text from the old wiki page, that old page will disappear from the list of wiki pages.
There's something to be said for a wiki rename command that would implement this sequence of actions automatically, but that hasn't been done so far. You can post a request on the fossil forum, and see if one of the developers picks it up. :-)
In principle it can be renamed by running the following in a SQLite file editor (if you try it from the "Raw SQL Commands" page, only the first UPDATE is successful):
UPDATE attachment SET target='new name' WHERE target='old name';
UPDATE event SET comment=':new name' WHERE comment=':old name';
UPDATE event SET comment='+new name' WHERE comment='+old name';
UPDATE event SET comment=replace(comment, '[old name]', '[new name]') WHERE comment like '%[old name]%';
UPDATE tag SET tagname='wiki-new name' WHERE tagname='wiki-old name';
At first glance it works but then you will not be able to update the content (which in fact can be useful to protect an article).
For the renaming to be effective you also have to modify the binary blob that contains the article, as well as update the deltas in case you have made previous edits.
I was working on this script that does the above automatically. To use it you have to execute the following in a console:
fossil_editor.py oldname newname repo.fossil
If everything goes well, something like this should appear:
This is fossil version 2.16 [7aedd56758] 2021-07-02 12:46:01 UTC
Artifact 61e7cc32f7 updated to 84b8195fe6
Artifact c2290869ad updated to 3ff4f96773
Artifact e993cd0331 updated to bc7e8d52df
References updated
Related
When committing, I used by mistake the ActifactID of ticket change instead of the ticket hash label:
fossil commit -m "Workaround X [58480ac08c]"
In fossil ui, it is still a clickable link and leads to the ticket. However, the check-in does not appear under "Check-ins Associated With Ticket".
Is there a way to associate a check-in with a ticket retrospectively?
On the command line, you can use 'fossil amend'.
Found in https://stackoverflow.com/a/3787977
In fossil ui, open check-in's properties and click on edit. The comment text can be changed there (to include the correct ticket hash label).
I have a store created on X-Cart, and I want to change/customize the contents of default error/404 page. I am using X-cart 5.3. Any ideas what can be done?
TIA
Ankit, if you want to change the default contents of the error page (not 404) or the maintenance page (this page shows while the store is in rebuilding state), you should look at the public folder of your X-Cart installation.
This folder contains error.html (this page is for admin user), and maintenance.html. Also, public/customer folder contains another error.html (the one that shows to the customers).
Don't modify these files, because they will be overwritten during the upgrade (replacing with the stock ones). Instead, copy them to another folder or create the entire error page from scratch. After that, modify the etc/config.php file to set the correct paths for the error pages like that (replace the <your_dir> part with your folder with the customized pages):
; Error handling options
;
[error_handling]
; Template for error pages
page = "<your_dir>/error.html"
page_customer = "<your_dir>/customer/error.html"
; Template for maintenance pages
maintenance = "<your_dir>/maintenance.html"
Make sure these options are not repeated in the config, if they do - remove the stock ones.
The 404 page is the different case because it is being rendered by the X-Cart templating engine - Twig. There are two ways to edit its content:
You can modify page heading and text labels. Open the X-Cart admin and go to the Store Setup -> Translations page and click on the link with the labels count across the language you want to edit.
Search for "Page not found" label, and click on the globe icon near the trash icon to edit all available translations. That is the heading of the 404 page.
Later on, search for "The requested page could not be found." label and repeat the procedure. This label contains the text of the 404 page.
Please note that any HTML code will be stripped, use the plain text only.
The second option is to modify the template HTML code. You should be accustomed to editing HTML and Twig languages, you should also have the ThemeTweaker addon.
Copy the skins/customer/404.twig file to the skins/theme_tweaker/customer/404.twig and edit it with the text editor.
Rebuild the store at the cache management page afterwards.
I am using Sitecore 8.1 and Glass mapper ORM. In page editor mode, I have a link field which can be linked to news article page. The folder structure is
News/News article. News folder is of type Bucket and article is bucketable item.
When I am trying to insert link from other pages to the actual news article I am unable to find search box or expand items under news. Is there any way I can insert link to the news article? Appreciate any help! Thanks in advance.
You have 2 options:
In the content editor in the view ribbon you can enable "Buckets". This will make all bucket items visible again (the bucket is expanded and all folders and items can be seen in the tree). This setting is taken into account in the "insert link" window as well.
Use the search tab in the "insert link" window (normally you should have 3 tabs (link, media items, search). The search tab will let you find the bucketed items as well, but also others - it is not restricted to a bucket.
Edit:
After trying this myself, I noticed that if you edit the link field within the experience editor the search is indeed not provided (not even with the general link with search field). In the content editor the search is present.
A workaround is option1, or use an EditFrame. But I would contact Sitecore Support as well and ask them to add this - I'll do it too.
Edit2 : issue has just been registered as a bug. If you need a fix without waiting for a solution in a future version, you can ask Sitecore Support.
I am using Sitecore 7, in rich text editor I want to add a link to a pdf file, I used "Add a Link" option from the tool bar, I went to "search" tab which I believe is new in this version of Sitecore, I searched my item and inserted a link, Sitecore uses following format for insert the link
a
href="~/link.aspx?_id=C3D29351D91C48E1A42C15E64060C547&_z=z
But the ID generated by the search function is not correct, it does not exist in the Sitecore database, If I manually edit the ID to the valid ID, it works, Why search function gives me a wrong ID?
See attched image as well.
I've created a ticket to the support yesterday about that issue, i'll edit my answer when i get an answer back (They can reproduce the error on a clean 7.2)
I've make a blog post which talk about the issue and give the ticket number (you can as the patch to the support)
http://sitecorefun.baziret.com/?p=131
Anyone know how to edit the name of the Sitecore desktop shortcuts? I'm using the Advanced System Reporter module, and creating a desktop shortcut from there, but now I can't change the name of the item.
I know that you can right click on the Sitecore desktop shortcut and choose properties so change the information of the link....but how can I change the name of the shortcut?
The properties have a field 'Name', that even when I change it, the shortcut doesn't change (even after a desktop refresh).
I tried changing the 'Link' field on the properties as well, but then the link disappeared.
Do these exist in the core database somewhere? Can I get back the one that I just lost (by changing the Link field)?
Through further research, I found that for normal links, the name can be edited by right clicking the link, selecting 'Properties' and changing the 'Name' field.
Unfortunately, Links generated through the Advanced System Reporter don't update on the desktop when this Name property is changed.
It seems that the links for these desktop shortcuts are a combination of items in the core database and values in the User profile in the aspnet_profile DB table (also in core, but only viewable through SQL).
This value is stored in the PropertyValueBinary field, which, as the name suggests, is all in binary, and can't (or shouldn't) be edited.
One way around this is to:-
Create the desktop link, which will be called something by default (i.e 'SalesReport').
Open up the core database in Sitecore, and navigate to /sitecore/content/Applications/Advanced System Reporter/Links. Then find the folder for your username.
Find the item that was created for the link (in this case it'll be 'SalesReport'), and change the value of the field 'Display name' to whatever you want the link called (i.e 'Sales Report for May'.
Note: You may want to change the name of the item as well, so that it won't get lost in other desktop links created in the future and will be easier to find later. In this case you will need to:-
Go back to the desktop, right click the shortcut and choose Properties.
Manually change the end of the 'Link' field to the name you want to call the item (i.e change it from 'SalesReport' to 'Sales Report for May'.)
When you click OK, the shortcut will disappear. This is expected.
Open up the core database in Sitecore again, and find the item you're changing. (i.e /sitecore/content/Applications/Advanced System Reporter/Links/SalesReport
Change the name to exactly what you changed it to in step 2.
The link will reappear on the desktop, it'll have the correct name, and will be easy to locate in the Sitecore DB in the future.