Skip to content
This repository has been archived by the owner on Apr 3, 2021. It is now read-only.

slug validation error #1

Open
greglinch opened this issue Oct 13, 2017 · 8 comments
Open

slug validation error #1

greglinch opened this issue Oct 13, 2017 · 8 comments

Comments

@greglinch
Copy link

Hello,

I'm getting a slug validation error when creating a new map. I'm running Ubuntu 16 on EC2. Any thoughts on how to resolve this issue?

Form

screen shot 2017-10-13 at 12 05 05 pm

Console

screen shot 2017-10-13 at 12 06 25 pm

It's referring to this line:

if ($scope.map.id || ($scope.slug && $scope.slug.indexOf(ngModel.$viewValue) === -1)) {

Thanks in advance!

@ejb
Copy link
Member

ejb commented Oct 13, 2017

Are you able to determine the value of $scope.slug in this case?

@greglinch
Copy link
Author

What would be the best way to do that? (Full disclosure: my JS experience doesn't include any Node or Angular — I'm primarily a Python dev.)

@ejb
Copy link
Member

ejb commented Oct 13, 2017

Add this above line 19 of pinpoint-editor/public/directives/unique-slug.js:

console.log($scope.slug);

It should appear in the web console above that error message.

@greglinch
Copy link
Author

Definitely had a mental block on that one — I'm very familiar with console.log(), d'oh! That gives me a good headstart to continue debugging on my own, thanks again!

@ejb
Copy link
Member

ejb commented Oct 13, 2017

Ha maybe I phrased it weird :)

@greglinch
Copy link
Author

Hello, again! Here's where I am re: the output of $scope.slug:

screen shot 2017-10-18 at 12 35 43 pm

I saw one thread with a similar error (postgres auth failed due to an invalid password), which recommended upgrading to the latest version, but that didn't work.

Any thoughts?

@ejb
Copy link
Member

ejb commented Oct 22, 2017

Hmm, do you have the Amazon S3 hosting set up? It's meant to be optional, but it's possible the slug validation won't work without it enabled. Which would be a bug.

@greglinch
Copy link
Author

Ah, gotcha. I don't have it set up at the moment, so I'll try that when I get a chance. Thanks!

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

No branches or pull requests

2 participants