Jump to content

TextExpander Workflow Inoperative


Recommended Posts

Thanks

 

I tried to activate it with the word expand.  The Workflow is not activated.  This is the output.

 

12:09:02.273] TextExpander[Script Filter] Queuing argument ''
[12:09:02.283] TextExpander[Script Filter] Script with argv '(null)' finished
[12:09:02.284] ERROR: TextExpander[Script Filter] Code 127: /bin/bash: /usr/bin/php: No such file or directory
[12:09:10.063] TextExpander[Script Filter] Queuing argument 't'
[12:09:10.074] TextExpander[Script Filter] Script with argv '(null)' finished
[12:09:10.075] ERROR: TextExpander[Script Filter] Code 127: /bin/bash: /usr/bin/php: No such file or directory
[12:09:10.112] TextExpander[Script Filter] Queuing argument 'te'
[12:09:10.124] TextExpander[Script Filter] Script with argv '(null)' finished
[12:09:10.125] ERROR: TextExpander[Script Filter] Code 127: /bin/bash: /usr/bin/php: No such file or directory
[12:09:10.212] TextExpander[Script Filter] Queuing argument 'tes'
[12:09:10.224] TextExpander[Script Filter] Script with argv '(null)' finished
[12:09:10.224] ERROR: TextExpander[Script Filter] Code 127: /bin/bash: /usr/bin/php: No such file or directory
[12:09:10.345] TextExpander[Script Filter] Queuing argument 'test'
[12:09:10.358] TextExpander[Script Filter] Script with argv '(null)' finished
[12:09:10.358] ERROR: TextExpander[Script Filter] Code 127: /bin/bash: /usr/bin/php: No such file or directory
[12:09:14.096] TextExpander[Script Filter] Queuing argument 'tes'
[12:09:14.105] TextExpander[Script Filter] Script with argv '(null)' finished
[12:09:14.106] ERROR: TextExpander[Script Filter] Code 127: /bin/bash: /usr/bin/php: No such file or directory
[12:09:14.267] TextExpander[Script Filter] Queuing argument 'te'
[12:09:14.300] TextExpander[Script Filter] Queuing argument 't'
[12:09:14.334] TextExpander[Script Filter] Queuing argument ''
[12:09:14.345] TextExpander[Script Filter] Script with argv '(null)' finished
[12:09:14.345] ERROR: TextExpander[Script Filter] Code 127: /bin/bash: /usr/bin/php: No such file or directory
[12:09:14.346] TextExpander[Script Filter] Script with argv '(null)' finished
[12:09:14.346] ERROR: TextExpander[Script Filter] Code 127: /bin/bash: /usr/bin/php: No such file or directory
[12:09:19.446] TextExpander[Script Filter] Queuing argument ''
[12:09:19.521] TextExpander[Script Filter] Script with argv '(null)' finished
[12:09:19.521] ERROR: TextExpander[Script Filter] Code 127: /bin/bash: /usr/bin/php: No such file or directory
[12:09:37.078] Logging Stopped.

Link to comment

The cause is your macOS version, which no longer has PHP in that location. In the editor, double click the Script Filter object and remove the /usr/bin/ at the start. So the line will just be:

 

php filter.php "{query}"

 

If you don’t have PHP, install it first.

 

Can’t say it’ll fix everything (there may be something else like the TextExpander format having changed) but it’ll take care of that particular error.

Link to comment

That make sense - thanks

 

 

PHP is now updated/installed

 

image.thumb.png.f1e3e24e426d6711ae61cea5c9967701.png

 

But Alfred says PHP is Deprecated....

 

 

 

[15:05:39.704] STDERR: TextExpander[Script Filter] PHP Deprecated:  Return type of Cake\Collection\CollectionInterface::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/CollectionInterface.php on line 691
PHP Deprecated:  Cake\Collection\Collection implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/Collection.php on line 26
PHP Deprecated:  Return type of Cake\Collection\Iterator\ReplaceIterator::current() should either be compatible with IteratorIterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/Iterator/ReplaceIterator.php on line 64
PHP Deprecated:  Cake\Collection\Iterator\ReplaceIterator implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/Iterator/ReplaceIterator.php on line 23
PHP Deprecated:  Return type of Cake\Collection\Iterator\UnfoldIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/Iterator/UnfoldIterator.php on line 67
PHP Deprecated:  Return type of Cake\Collection\Iterator\UnfoldIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/Iterator/UnfoldIterator.php on line 78
PHP Deprecated:  Cake\Collection\Iterator\FilterIterator implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/Iterator/FilterIterator.php on line 26
[15:05:39.707] TextExpander[Script Filter] Deprecated: Return type of Cake\Collection\CollectionInterface::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/CollectionInterface.php on line 691

Deprecated: Cake\Collection\Collection implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/Collection.php on line 26

Deprecated: Return type of Cake\Collection\Iterator\ReplaceIterator::current() should either be compatible with IteratorIterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/Iterator/ReplaceIterator.php on line 64

Deprecated: Cake\Collection\Iterator\ReplaceIterator implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/Iterator/ReplaceIterator.php on line 23

Deprecated: Return type of Cake\Collection\Iterator\UnfoldIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/Iterator/UnfoldIterator.php on line 67

Deprecated: Return type of Cake\Collection\Iterator\UnfoldIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/Iterator/UnfoldIterator.php on line 78

Deprecated: Cake\Collection\Iterator\FilterIterator implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /Users/richardkaplan/UMRPC Dropbox/Richard Kaplan (rkaplan@rehabanalytics.com)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.040CAB3B-3AEB-4313-A7AE-29C1DF3C6767/vendor/cakephp/collection/Iterator/FilterIterator.php on line 26
<?xml version="1.0"?>
<items>
  <item title="404 Not Found" valid="yes">
    <title>404 Not Found</title>
    <icon></icon>
  </item>
</items>
[15:05:43.563] Logging Stopped.

 

 

Alternatively, if I change the language from /bin/bash  to /usr/local/bin/php then I get this:

 

[15:10:27.827] TextExpander[Script Filter] Queuing argument ''
[15:10:27.891] TextExpander[Script Filter] Script with argv '(null)' finished
[15:10:27.894] ERROR: TextExpander[Script Filter] Code 255: PHP Parse error:  syntax error, unexpected identifier "filter" in Command line code on line 1
[15:10:27.897] TextExpander[Script Filter] Parse error: syntax error, unexpected identifier "filter" in Command line code on line 1
[15:10:27.905] ERROR: TextExpander[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0. in JSON:
Parse error: syntax error, unexpected identifier "filter" in Command line code on line 1

 

 

 

image.png

Edited by Richard Kaplan
Link to comment
10 minutes ago, Richard Kaplan said:

But Alfred says PHP is Deprecated

 

No, what’s deprecated is an option from PHP. It’s the language sending the message. Your version is too new. You can uninstall and install an older one. But you should instead ask the developer on GitHub. They may have another solution on hand. It’s something you should only need once.

 

12 minutes ago, Richard Kaplan said:

if I change the language from /bin/bash  to /usr/local/bin/php

 

That breaks the code. It’s equivalent to having text in English, which is set to be understood in English, and you tell the program to instead read it as if it was German. It no longer makes sense.

Link to comment

Thank you.

 

Now I get a 404 error in the PHP script.

 

I looked at the source code for that script and it is looking for a local copy of my TextExxpander snippets.  But it turns out that several versions ago, TextExpander switched to storing snippets online in their own system.

 

So while I could export the snippets and fix the script, I would have to repeat the export process every time I change or add a snippet.

 

Oh well.

 

Thank you very much for all your time - this was helpful to learn even though it seems a solution may be out of reach.

 

[15:54:17.967] Logging Started...
[15:54:21.651] TextExpander[Script Filter] Queuing argument ''
[15:54:21.713] TextExpander[Script Filter] Script with argv '' finished
[15:54:21.715] TextExpander[Script Filter] <?xml version="1.0"?>
<items>
  <item title="404 Not Found" valid="yes">
    <title>404 Not Found</title>
    <icon></icon>
  </item>
</items>
[15:54:21.998] TextExpander[Script Filter] Queuing argument 't'
[15:54:22.051] TextExpander[Script Filter] Queuing argument 'te'
[15:54:22.109] TextExpander[Script Filter] Script with argv 'te' finished
[15:54:22.113] TextExpander[Script Filter] <?xml version="1.0"?>
<items>
  <item title="404 Not Found" valid="yes">
    <title>404 Not Found</title>
    <icon></icon>
  </item>
</items>
[15:54:22.169] TextExpander[Script Filter] Queuing argument 'tes'
[15:54:22.226] TextExpander[Script Filter] Script with argv 'tes' finished
[15:54:22.232] TextExpander[Script Filter] <?xml version="1.0"?>
<items>
  <item title="404 Not Found" valid="yes">
    <title>404 Not Found</title>
    <icon></icon>
  </item>
</items>
[15:54:22.297] TextExpander[Script Filter] Queuing argument 'test'
[15:54:22.355] TextExpander[Script Filter] Script with argv 'test' finished
[15:54:22.357] TextExpander[Script Filter] <?xml version="1.0"?>
<items>
  <item title="404 Not Found" valid="yes">
    <title>404 Not Found</title>
    <icon></icon>
  </item>
</items>
[15:54:22.535] TextExpander[Script Filter] Queuing argument 'test1'
[15:54:22.666] TextExpander[Script Filter] Script with argv 'test1' finished
[15:54:22.673] TextExpander[Script Filter] <?xml version="1.0"?>
<items>
  <item title="404 Not Found" valid="yes">
    <title>404 Not Found</title>
    <icon></icon>
  </item>
</items>
[15:54:26.117] Logging Stopped.

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...