Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to upload XML file #217

Open
LaurensCosta opened this issue Jun 24, 2021 · 4 comments
Open

Not able to upload XML file #217

LaurensCosta opened this issue Jun 24, 2021 · 4 comments

Comments

@LaurensCosta
Copy link

Today I tried to upload some redirects (after downloading the existing redirects and adding new redirects. This worked fine but when I wanted to do the "trick" one more time I got an error on the upload. First I thought I needed to permanently delete all custom redirects but even after I did this I got an error on the upload.

Does anybody knows what I can do to fix this?

@marisks
Copy link
Member

marisks commented Jun 28, 2021

Which version of the package do you use?
What is the error in the log?

@LaurensCosta
Copy link
Author

LaurensCosta commented Jun 28, 2021 via email

@marisks
Copy link
Member

marisks commented Jun 28, 2021

The developers of the project should be able to see what version is used and also should be able to inspect logs.

@masmith939
Copy link

masmith939 commented Jan 27, 2023

@LaurensCosta You check the response of the ImportRedirects endpoint, you could find the error.

@marisks This issue happened to me too. I'm using 11.3.0. The error for me was:
[ArgumentException]: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at BVNetwork.NotFound.Core.CustomRedirects.RedirectsXmlParser.Load()
at BVNetwork.NotFound.Controllers.NotFoundRedirectController.ImportRedirects(HttpPostedFileBase xmlfile)

Hope this helps.

As a workaround, I found I had to remove dupes in the XML file - using the following XPath in Visual Studio Code with the XML Tools extension works: //url/old[text()=following::old or text()=preceding::old].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants