Jump to content

Snippet expansion closes web form


Recommended Posts

Not really sure how to describe this, so I took a screen grab of the occurence, but basically when trying to use an Alfred snippet in a field on a webform, it closed the field without entering the text. I tried a few times, then made a text replacement in the System Preferences that worked as expected. I saved a web archive of the webpage in question, since I couldn’t isolate any action in the console. What’s the best way to share a small (<1MB) video of the behavior?

Edited by Neberheim
Link to comment
2 hours ago, Neberheim said:

What’s the best way to share a small (<1MB) video of the behavior?

 

Don't. Pictures/videos of stuff going wrong are of extremely little use unless you're doing something extremely obviously wrong.

 

You wouldn't send your mechanic a video of your car failing to start and expect him to tell you why it's not working, would you? Because you know he's not going to be able to unless you're trying to start the car with a banana.

 

The same applies: We need to be able to reproduce the problem in order to figure it out. If we can't, we're just guessing.

 

Describe exactly what you're doing; which website it's on; and export, upload & link the snippet that's causing the issue.


It sounds a lot like you have a newline in your snippet that the form is interpreting as a ↩ keypress. But that's just a guess because it's impossible to tell without knowing exactly which snippet isn't working exactly where.

Link to comment

As a mechanic, I found videos quite helpful, because behaviors are difficult to reproduce sometimes, and seeing or hearing what happened helped me narrow down possible causes. I suppose I thought that demonstrating what happened along with a description of what I was doing would paint a clearer picture than words alone, especially since I don’t know the proper jargon, but now I know.
I was on FedEx in my shipping manager nicknaming a label watch
The snippet is :apple logo: to create the . The field closed without accepting the entry as soon as the suffix was typed. It had no issue with a : by itself or using it in a phrase that had no snippet associated with it e.g. :potatohead:
Using the text replacement within the Keyboard pane in System Preferences, the phrase applelogo worked fine and allowed me to type the full watch phrase and hit ↩ to save.
I even tried removing the colons to use the same language applelogo to expand the snippet, but still exited the field without entering or saving any text. That’s what led me to wonder if it’s due to how Alfred expands text being incompatible with however the field operates.
I’m not sure how to export a snippet, can you explain that? If it’s helpful to pull any of the page elements, I can try to figure that out too.

Edited by Neberheim
Markdown
Link to comment
50 minutes ago, Neberheim said:

because behaviors are difficult to reproduce sometimes

 

And literally impossible without the thing they were produced with in the first place.

 

51 minutes ago, Neberheim said:

The snippet is :apple logo: to create the . The field closed without accepting the entry as soon as the suffix was typed

 

Sorry, but this is all worthless until you export the snippet, upload it somewhere and post a link.

 

I know it sounds like I'm being a dick about it, but consider the last issue with one of my workflows that I solved.


There was an invisible Unicode character in the script breaking it. Did you check your snippet for those? Did you even know that's a thing?

 

It took under an hour for me to identify and fix the issue once the user finally did as asked and uploaded the actual broken thing instead of posting pictures of it.

 

If you want help, then please provide what the people who are offering to help you ask for.

Link to comment
8 minutes ago, deanishe said:

If you want help, then please provide what the people who are offering to help you ask for.

 

It does seems a little aggressive: please see the last sentence of my post, I’m not sure how to do that or I would have done so.

 

It’s the snippet “Mac Symbols” from the homepage.

Edited by Neberheim
Link to comment
29 minutes ago, Neberheim said:

I’m not sure how to do that or I would have done so.

 

Right-click on a Snippet Collection and choose Export…

 

29 minutes ago, Neberheim said:

It does seems a little aggressive

 

Yes. My apologies. It comes from a few years of far more time spent trying to get people to provide the necessary information than actually fixing their issues. And there are stickied posts in the relevant forums explaining clearly exactly how to describe an issue.

 

I admit, I didn't read your whole post because it was fairly immediately apparent that it wasn't obviously helpful in fixing your issue.

 

In any case, it's 3.30 a.m. here, and I'm off to bed now.

Edited by deanishe
Link to comment

The snippet file itself is fine.

 

It's likely a bad interaction between the website/browser and snippet expansion (Apple's text replacement doesn't use the same mechanism).

 

Which browser are you using, and which version? Can you post a URL to a page where the problem occurs?

 

Do other snippets work in the same form? I'm pretty sure that the Apple logo is not a standard character (it only shows on Apple devices). It's possible that something like a validation script on the website doesn't like it.

Link to comment
On 6/19/2018 at 11:34 AM, deanishe said:

Which browser are you using, and which version? Can you post a URL to a page where the problem occurs?

 

Safari 11.1.2; build 13605.3.5

The site is located at FedEx Delivery Manager, but you will have to have a FedEx account to access the page.

Sounds silly, but I didn't think to try with another browser. I'll download Firefox and give it a go.

 

On 6/19/2018 at 11:34 AM, deanishe said:

Do other snippets work in the same form? I'm pretty sure that the Apple logo is not a standard character (it only shows on Apple devices). It's possible that something like a validation script on the website doesn't like it.

 

 

No Alfred snippets work; each produces the same behavior. The field accepted watch from the system text replacement, however, and shows in other areas of the website after entered. It's a PUA Unicode character, so it shouldn't be the problem as long as the field supports Unicode code points, right?

Link to comment
1 hour ago, Neberheim said:

but you will have to have a FedEx account to access the page.

 

That's why I said "a page", not "the page", though in hindsight that's not very clear. Do you know another, publicly-accessible page on the site that has the same issue?

 

1 hour ago, Neberheim said:

It's a PUA Unicode character, so it shouldn't be the problem as long as the field supports Unicode code points, right?

 

It's definitely not a problem with the field (which is implemented by Safari). It's possibly, as I suggested, a problem with a validation script running on the site that's choking on or explicitly rejecting the character because you most likely don't want PUA code points in your database.

Link to comment
30 minutes ago, deanishe said:

That's why I said "a page", not "the page", though in hindsight that's not very clear. Do you know another, publicly-accessible page on the site that has the same issue?

 

I figured out that the nickname can be edited from the publicly-accessible tracking page, you would just need a valid tracking number to view and edit the field. I tried to DM you one of mine, but Twitter requires following.

 

36 minutes ago, deanishe said:

It's definitely not a problem with the field (which is implemented by Safari). It's possibly, as I suggested, a problem with a validation script running on the site that's choking on or explicitly rejecting the character because you most likely don't want PUA code points in your database.

1

 

I didn't phrase that well; the form accepts the character and displays it properly, even on other web pages, but only if entered by copying and pasting or using the MacOS text replacement.

Link to comment

You mean the Nickname field, right?

 

As best as I can tell, you can't paste anything in that field. It doesn't matter whether it's the Apple logo or the word "bob".


So the reason Apple text replacements work, but Alfred snippets don't, appears to be because FedEx's webdevs have implemented a broken field that doesn't accept pastes.

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...