I am facing some strange with VSTS and visual studio 2017. I was working on some changes since last 2 weeks and since last Friday I could see all my pending changes.
However On Monday when I tried same to check my pending changes I am not able to see any file checked out and it says no pending changes. I checked my changes in one of the file and I found those changes but then in this case my file must have been checked out as per my knowledge.
Now I am not able to see any checked out file and my pending changes list is empty. Pleas help me to resolve this issue.
There could be many reasons for this. Below are some of the common reasons I could think of:
Go to File -> Source Control -> Advanced -> Change Source Control and make sure that you have Project binding ON. If not click on 'Bind' button. Now if you edit any file it will be get automatically checked-out and will be available in 'Pending Changes' list.
For now, go to 'View -> Other Windows -> Source Control Explorer', right click on project folder and select 'Compare'. It will show the list of files that differ from TFS. Check out the files to make those available for 'check-in'
Also make sure that in 'Compare' list 'Latest' column shows 'Yes'
Related
Xcode 8.2 beta 8C30a, Swift 3, iPhone 5s.
I'm writing a weather app that wants to use the iPhone's location. To get authorisation I have set (all of) the following my Info.plist:
<key>NSLocationAlwaysUsageDescription</key>
<string>Your current location is used to provide you with a local weather forecast.</string>
<key>NSLocationUsageDescription</key>
<string>Your current location is used to provide you with a local weather forecast.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Your current location is used to provide you with a local weather forecast.</string>
Nevertheless, when I call LocationManager.requestWhenInUseAuthorization() then I get the following error:
This app has attempted to access privacy-sensitive data without a usage description.
The app's Info.plist must contain an NSLocationWhenInUseUsageDescription key
with a string value explaining to the user how the app uses this data
The key is there but not being seen. There is no entry for the app in the phone's settings menu (nor under privacy). Doubtless, I'm missing something simple. Any ideas?
I just encountered the same problem with one particular App, and I have several Apps with the same structure which are working just fine when I request authorization for Location Services.
In all cases, I have localized the Application, so I have several Info.plist files in my XCode project (e.g. one for the Base language which is English, another for French, etc).
I always manually edit my Info.plist files (viewing them "as Source Code") and add the NSLocationWhenInUseUsageDescription fields).
But in this specific App's case, I noticed that XCode was NOT showing the NSLocationWhenInUsageDescription field when I selected the App Target in the Project's list of Targets and then clicked on the "Info" tab. This is odd, because when I check the "Info" tab in my other XCode projects, edits made to the Info.plist file for the Base language appear here. So I manually added a NSLocationWhenInUseUsageDescription field to this "Info" UI and suddenly my new App was working correctly, requesting the user's permission to access Location Services when in use.
I'd recommend checking that all the fields you have added to your Info.plist file are reflected in the Target/Info screen. If they are not, you may have a similar problem, in which case the same fix may work for you.
I am guessing the root cause of the problem is a bug in the localization process. I recall that after selecting the Info.plist file as one of my localized files, I got an error from XCode at build time, complaining that it was missing an Info.plist file (it had moved Info.plist from the base.lproj folder to en.lproj when it "localized" the file). I reinstated the file that XCode had moved from the base.lproj folder to the en.lproj folder, and that seemed to make XCode happy again. But I think somehow it lost the ability to refresh itself, so subsequent additions to the Info.plist file(s) aren't being applied everywhere they need to be).
How do you resolve this issue?
image of message
(Black lines are to hide my username and project name)
Please check the path of your .momd file once. According to image you've provided, /Users/.../Library/Mobile Documents/com~Apple~CloudDocs/.../MyModel.momd is the path expected. But, it couldn't read the core-data file from that path. Please move your .momd file to that expected path and try building it again.
I got "could not determine generated file path for core data" when I moved my Core Data Model to a different folder. Go to your project file. In your Build Phases tab locate the model under Compile Sources and remove it. Then press + to add it back but DO NOT select it from the list you see right away (does not update the file path). Instead select "Add Other" and go select it from it's new location. Then leave the defaults of "copy if needed". Clean your build folder and you're good to go.
In my case this left me with 2 models in my property pane. I deleted the old and dragged and dropped the new one into the correct Xcode group. And all was right with the world again. Hope this helps someone else out.
I'm thinking this might have something to do with a template, but it's really weird.
I started off with a .doc file and a .docx file that I had previously edited, combined them, and saved the result as a .docx file. Both files were originally created as templates by someone else long ago. Within a few minutes, the fonts and spacing of everything in the document have been changed, making a total mess out of my document. I also noticed something in the lower left corner referencing "contacting" a template. I never noticed this before with these templates.
What a mess. How can I make it stop doing this? If I take the time to reformat everything the way I want it again, I don't want it to revert back the next time my back is turned.
Thanks,
Rebeccah
Ah. I got it figured out. One of the component documents, and the merged document, had a template attached to it that was stored on a server. The template file on the server doesn't exist any more - someone must have recently deleted it. The reformatting apparently reflects Word automatically changing the template to normal.dot.
If I catch it in time, before the changes are made, I can save the file as a .dot or .dotx (template) file, and then attach that local template file to future documents so they don't have to rely on the template that is no longer on the server.
How I figured this out:
Google found an answer to a question about disabling a long wait for a linked file that no longer existed, leading me to File | Options | Advanced | General - uncheck "Update automatic links at open." That didn't undo the reformatting that had already happened, but may have prevented reformatting of the component document the next time I opened it.
The same answer pointed me to the right side of the File page, where various file properties are displayed. When I click on "Show All Properties", I can see the file name of the Template file, as the eighth property displayed.
General googling about Word templates led me to File | Options | Customize Ribbon | Customize the Ribbon, where I checked the previously empty box next to "Developer". Now, Developer | Document Template allows me to see and change the location of the document template.
I opened a previous version of one of the component files (the .doc file), the one that had the template from the server attached to it, and watched Word search for the template. But it did not reformat it the file. I saved the file as .dot, as .dotx with compatibility, and as .dotx - just to be sure I had all necessary options available.
I opened my reformatted composite file, went to Developer | Document Template, and specified my recently saved .dotx file as the template, made sure that "Automatically update document styles" was checked, and clicked OK.
Voila! I have my previous formatting back.
Rebeccah
I have one problem about filezilla. I accidentally move one folder to wrong directory, so it shows the errors when I view my website.
How can I solve it? Please help me.
Many thanks in advance for your answer.
You cannot undo, but you should understand why that happened and how to prevent that from happening again in the future.
This happened because Filezilla allows Drag-and-drop move functionality on both folders (directories) and files, very dangerous on production servers.
There is actually a feature-request for 11 years now, please add your vote to the list to get this done: https://trac.filezilla-project.org/ticket/2191
In the mean time, please consider using another software that allows the user to set this behavior as an option:
WinSCP: http://winscp.net/eng/docs/screenshots
WS-FTP Pro: https://trac.filezilla-project.org/attachment/ticket/2191/ws_ftp-professional-options.gif
EDIT: Filezilla team responded (sort of) to the feature request and you can block drag and drop in the xml config file. It's better than nothing.
You cannot undo ftp moves. The only way to rectify the problem is to manually move the folder to it's original location.
I suggest you be more careful from next time.
If you don't know where the folder belongs, download the x-cart script package and check where the directory belongs.
Sorry for late, but I am up to date. I get logs from filezilla of moved files.
Status: Renaming '/var/www/html/brb/abc.js' to '/var/www/html/brb/node_modules/abc.js'
Status: /var/www/html/brb/abc.js -> /var/www/html/brb/node_modules/abc.js
Status: Renaming '/var/www/html/brb/xyz.html' to '/var/www/html/brb/node_modules/xyz.html'
Status: /var/www/html/brb/xyz.html -> /var/www/html/brb/node_modules/xyz.html
I write script in js to build command
let x = ['/var/www/html/brb/abc.js -> /var/www/html/brb/node_modules/abc.js',
'/var/www/html/brb/xyz.html -> /var/www/html/brb/node_modules/xyz.html'];
let cmd = [];
x.forEach(p => {
let path = p.split('->');
cmd.push(`mv ${path[1]} ${path[0]}`);
})
console.log(cmd);
Output:
['mv /var/www/html/brb/node_modules/abc.js /var/www/html/brb/abc.js'
'mv /var/www/html/brb/node_modules/xyz.html /var/www/html/brb/xyz.html']
Use any editor like vscode etc and remove string quotes and execute command in server terminal etc
mv /var/www/html/brb/node_modules/abc.js /var/www/html/brb/abc.js
mv /var/www/html/brb/node_modules/xyz.html /var/www/html/brb/xyz.html
A simple answer is,
Copy the folder into the desired location and then delete from the current location where you moved it mistakenly.
Now, what if you overwrite a file.
I just edited a file in local, then downloaded the file from my server into the local, and my all the local updated data is gone. There seems no solution of this, but there may be one possibility, I may be the lucky enough that this is my case.
If you were working on that local file, so most probably it is opened in your browser. Do not refresh it. Copy the content one by one, and update the file again. You can also open developers tools of both old and new page. Compare them line by line and do the job.
I had the same issue and resolved it manually.
The log panel was helpful in this. It is the large panel below the connection form in the top menu.
From that log panel, I was able to figure out all the files which were moved with their current and previous location.
I copied those all log lines and paste them somewhere in notepad and then manually selected all files and move those all at once to their original directory.
Screenshot: The log panel showing last actions
I'm helping our Editors to clean up broken links and have been looking for answers to the following:
The Broken Link Report cannot be exported or sorted so it's not very useful (we have many broken links ~2000). Is there a SQL script that I can run to create the same report?
If an Editor fix a link, Rerun the report doesn't seem to take the item off the report. Does she have to Rebuild Link Database every time?
The Links button in the menu is helpful, but it is listing All Versions of referrers. Is there a SQL script to find only the lastest version?
When delete or archive an item and let Sitecore remove broke links, will all the affected items be published?
We are dealing with a large report (~2000 items) due to not maintaining it diligently. The goal is to reduce the number to 100~200 and keep it under control from now on. Any general advice on how to clean up broken links report is appreciated.
For your first (and partly third) questions:
In the Core database you can check what gets executed on the click of the Broken Link Report (the item that defines it is located in : /sitecore/content/Documents and settings/All users/Start menu/Right/Reporting Tools/Scan for Broken Links.
The application that gets started is /Applications/Tools/Broken Links.aspx, so if we look at *webroot*/sitecore/shell/Applications/Tools/Broken Links/Broken links.xml, we can see that the code used for it is Sitecore.Shell.Applications.Tools.BrokenLinks.BrokenLinksForm in the Sitecore.Client assembly.
Using Reflector you can see what it's executing. For your requirements, what I would say would be the easiest is to create your own version of the BrokenLinksForm, possibly simply adding an export functionality on it, or modify the code so it only takes the latest version. From looking at it very quickly I think the code to change (which is actually in the nested Scanner class) is:
...
foreach (ItemLink link in Globals.LinkDatabase.GetBrokenLinks(database))
{
list.Add(link);
}
...
You could possibly check whether the link item is the latest version, possibly by using something like
...
var version = link.GetSourceItem();
if (version.Versions.GetLatestVersion().Version == link.SourceItemVersion)
{
list.Add(link);
}
...
While you're at it you could of course also put in some sorting functionality :-)
It doesn't translate 1-on-1 with the Links button in the menu, but it should give you some pointers in the right direction.
As to your 2nd question: I believe that yes, the Link database does need to be rebuilt. I don't know if Sitecore has a schedule set up by default, but you could create your own agent in the <scheduling> node in the web.config to do this after X time.
Your last question: If you delete or archive an item and have Sitecore remove the broken links the affected items will, by default, not be published. If you have an auto-publish set up it'll show up of course.