<div dir="ltr">Ahhhhhh!<div><br></div><div>I was getting errors in epadmin, but I'd fixed those (the one on github has not been updated to reflect this).</div><div><br></div><div>The indexer log: I had no idea this existed and it's provided a clue:</div><div><br></div><div>Event::TwitterEvent::send_tweet: Error during execution: Can't call method "get_conf" on an undefined value at /opt/eprints3/archives/uolrepo/cfg/plugins/EPrints/Plugin/Event/TwitterEvent.pm line 44, <DATA> line 960.<br></div><div><br></div><div>Which is.... my $hashtagsfield = $repository->get_conf( "twitter", "hashtagsfield");</div><div><br></div><div>I'm assuming this is because in this case I'm using the "keywords" of an EPrint as hashtags and the particular example record doesn't have keywords and so.... Failure.</div><div><br></div><div>Thank you so much for this David. Knowing about the indexer log changes this from stumbling around in the dark to something I might be able to investigate.</div><div><br></div><div>Thanks,</div><div>James</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 16, 2020 at 12:15 PM Newman D.R. <<a href="mailto:drn@ecs.soton.ac.uk">drn@ecs.soton.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hi James,</p>
<p>I am fairly certain, as you say, that the roles for the Coin DOI button under actions as you really want to restrict who can uses this.
<br>
</p>
<p>I assume you are seeing "Everything Seems OK" when you run epadmin test. I know certain things won't be covered there and this is only a syntax check when you actually start passing around real values might be when the bug becomes apparent. I ofter run:<br>
</p>
<p>perl -I EPRINTS_PATH/perl_lib/ -c FULL_PLUGIN_FILENAME<br>
</p>
<div>to test the individual file syntactically. However, as this is running the the indexer, any runtime error message is likely to appear in indexer.log under EPRINTS_PATH/var/. Also it should be noted that need to restart the Indexer
not just reload Apache* to put into effect any changes you have made to the event plugin.</div>
<div><br>
</div>
<div>Regards</div>
<div><br>
</div>
<div>David Newman<br>
</div>
<div>*Reloading Apache should not necessary but is a good sanity check and if you do have a bug saves this taking down to repository next time Apache is reloaded/restart for something else or a general reboot of the server.</div>
<div><br>
</div>
<div>On 16/01/2020 11:59, James Kerwin wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi David,
<div><br>
</div>
<div>Thanks for this. As it happens I was heavily borrowing from the DataCite plugin because it seems to have a bit of everything in it. The only obvious difference I can see between that and mine (beyond the overall quality and programming ability) is the
roles, but I was (and still am) convinced that the roles were for the appearance of the minting button.</div>
<div><br>
</div>
<div>I would have thought that, if I'd made an error in my code, the server would refuse to show me any EPrints pages after a restart until I'd fixed it. Perhaps Events work differently.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>James</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Jan 16, 2020 at 8:50 AM Newman D.R. <<a href="mailto:drn@ecs.soton.ac.uk" target="_blank">drn@ecs.soton.ac.uk</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hi James,</p>
<p>The DataCiteDOI Bazaar plugin contains an Event plugin that it used to calls DataCite to coin (mint) a DOI. This sounds like it would be doing a similar thing to posting some (I think) JSON to generate a tweet:<br>
</p>
<p><a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbazaar.eprints.org%2F1100%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C1a7f3b4635fb451bc21d08d79a803410%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=3zOZkcVI6baMZtitrpMoN79iycNtlynfdIiODZ%2FZY6s%3D&reserved=0" originalSrc="http://bazaar.eprints.org/1100/" shash="sE2mrcFnTpUOQbYX3IIOJIYw588Tawx0URN+E1/kIeAdM7/wcpN2dNaciKX/HOahbvDz1gvtuYnxrOjN+YsuWrzLMLEPh04tvo468VjX+a6XXXxeF44JfMo58tI4S1yyiBYdzn5UV7pbATMx2q0JJ1j+4YEmSTrlH47BlBh9/jY=" target="_blank">http://bazaar.eprints.org/1100/</a></p>
<p>Regards</p>
<p>David Newman<br>
</p>
<div>On 16/01/2020 08:39, Adam Field via Eprints-tech wrote:<br>
</div>
<blockquote type="cite">
<div dir="auto">Is it in github? Can you link me to the code?</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 16 Jan 2020 08:31, James Kerwin via Eprints-tech <a href="mailto:eprints-tech@ecs.soton.ac.uk" target="_blank">
<eprints-tech@ecs.soton.ac.uk></a> wrote:<br type="attribution">
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hi All,<br>
<div><br>
</div>
<div>I rewrote my twitter bot using a different Perl module as it wasn't working how I wanted it to (failed with "special characters").</div>
<div><br>
</div>
<div>It worked when I rewrote it as a .pl in cfg.d. I then decided to rewrite it as an Event plugin as this seems like the "proper" way to do things. Unfortunately, it doesn't work.</div>
<div><br>
</div>
<div>I can see that it gets added to the indexer and it subsequently fails.</div>
<div><br>
</div>
<div>One possible reason it fails is that I don't have any user roles set up for it. For an event plugin, do I need user roles to be set up?</div>
<div><br>
</div>
<div>I've tried to look at documentation for other plugins, but they also involve a "Screen" plugin which is what I assume the user roles are for. My plugin just uses the status change trigger to compile and send a tweet.</div>
<div><br>
</div>
<div>Any pointers greatly appreciated.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>James</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<pre>*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C1a7f3b4635fb451bc21d08d79a803410%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=Ed%2FRSRjSXaIIMDQ0a62Rj4sVwyfUu8pV%2Fb%2F4h1PVLmI%3D&reserved=0" originalSrc="http://www.eprints.org/tech.php/" shash="Wrk1jFAxwoWIhQj1JsVVXztsIeOqG+5efbEMKR9nzmW8FDuk9hlpRqiyPfycQOUehI1CZ4eFrLfJT4ya6q/ISSN91cHoIMrDayYaVzDPa4TVR/p9l3gc3QYDeNG/mXL3SVRyuFFEEoQdHZVMckqshiQpnF1tYj0dW89y6HLmasM=" target="_blank">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C1a7f3b4635fb451bc21d08d79a803410%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=WuLZGaweCMS35bprp8ZK1t7FiHZt28cePCGd8mKYkpQ%3D&reserved=0" originalSrc="http://wiki.eprints.org/" shash="e9XnFekQQBa4I0zUGq1VG6YvOv4li4LnjNSjuUMVvA8OI7ljkS+YjhT0tFTrgb7YwvqnTqCgXguy6oockzkuF3WuWJW0pou3RpozvkMBVN3ictLujQVLM8osqJM7u+LDFlQID7vRsCDJTxbGtFVACUD0l313aKrkfI2/LK6jsbk=" target="_blank">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C1a7f3b4635fb451bc21d08d79a803410%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=hwsH29gb4g2kY6ot0LlToIBWVEq0MlJcmlw8nd7Fzp4%3D&reserved=0" originalSrc="http://forum.eprints.org/" shash="z8kfZB3tV4v8B37EDwHgQqQGjrT/btsIM0I4XxTk7b0ZlKzARaB+so2AucVIjKyY2rQCddGvA8K4s6pZqqMykYp9p7jkAxfCgFT9acaqYiW/BNInMhgTFlTZw6Q6Jd0CWg6J9D/MlKCW1TxhULN/JRCpBjDH3eG4naTQHkMlgNY=" target="_blank">http://forum.eprints.org/</a>
</pre>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote></div>