Scalar 2 User's GuideMain MenuGetting StartedExplains account and book creation, and some interface basics.QuickStartsA path of all QuickStart content in this user's guide.Working with MediaHow to get the most out of your use of media in Scalar.Working with ContentCreating and editing content in Scalar.Working with WidgetsWorking with StructureHow to use Scalar's many options for structuring publications.Editorial WorkflowHow to use features for performing editorial review of content.VisualizationsExploring the contents of a book visually.LensesAn introduction to lenses, a tool for searching and visualizing Scalar content.Advanced TopicsDescribing Scalar's more advanced features.Third Party Plugins and Platforms
Rewrite physical media SQL script
12017-10-10T13:05:49-07:00Craig Dietrich2d66800a3e5a1eaee3a9ca2f91f391c8a689349032963A file for rewriting URLs to be run in MySQLplain2018-04-02T19:19:58-07:00Amaresh R JoshiCraig DietrichCraig Dietrich2d66800a3e5a1eaee3a9ca2f91f391c8a6893490
This page is referenced by:
12017-10-10T12:32:18-07:00Transfer physical media, too, and rewrite URLs after you've used the Transfer tool7Directions on moving media and hooking it up to a new book populated by the Transfer tool.plain2019-11-27T08:38:38-08:00The Scalar book Transfer tool is kept in the Dashboard's "Import/Export" tab. It allows authors to move Scalar books from one place to another. Most often, this transfer is across servers, moving a source book under one domain to a destination book on another domain. However, while all a book's pages and relationships will be transferred, including media-pages, any physical media that was uploaded to the source book will not be physically copied to the destination book, even if it's on the same server. If you have pages that connect to uploaded media, the result in the destination book will be media-pages where the URLs point to the media in the source book:
Source book media-page
URL points to media in the source book's folder on server
Destination book media-page
URL points to media in the source book's folder on the source book's server
The transferred book may appear to be loading all of its media just fine—and it will continue to do so, as long as the media still exists in its original location. As soon as that media is deleted or moved, however, it still stop loading in your book. Consequently, you may want to move the physical media from the source book’s folder to the destinations book’s folder to reduce your project’s potential points of failure. You can accomplish this via FTP, as you would any file transfer. After physically transferring the media, the last step is to update the URLs of the destination book's media-pages to point to the media now present in the destination book's folder on the new server. There is no "built-in" way to do this in Scalar, but it can be accomplished by running a few queries in MySQL.
Also, a problem might exist that hyperlinks that were created in the text content of the source book's pages might continue to point to pages in the source book instead of the new pages in the destination book. The MySQL described below will correct this problem as well.
First, open up phpMyAdmin on your destination server or the MySQL command line. If in phpMyAdmin you can then select the database and click over to the "SQL" tab where you can run custom queries. Go ahead and run the below set of queries:
That's it! You should notice that the destination book's media-pages now point to the physical media on the destination server. In which case, the source Scalar book can be safely removed.