Straight forward task!

Comments

alauzon’s picture

Component: Transactions » Entities

I am willing to do this task. Tell me where to start from and I'll do it on my free time.

matslats’s picture

Do you do git?
Drupal.org shows you how to download the repository then I can give you write access.
I've had a look through and there aren't any comments cache @todos any more.
A similar task though is the text filtering. All text input by users needs to be passed through the right kind of filter.
Things changed a couple of times in the last 2 years and sometimes I forget completely.
Although perhaps the only strings entered by normal users are transaction descriptions, and since they are in a fieldAPI field I imagine they are properly handled already.
Maybe the best way to start is by reviewing the code. Most of it has never been seen by a human being, myself excepted. Maybe you can offer some feedback, see if you can find any strangeness?

alauzon’s picture

I have seen a bug when going to admin/accounting/currencies, I get:

The website encountered an unexpected error. Please try again later.

Looking at recent entries there are 2 errors:

Notice : Undefined property: Drupal\mcapi\ListBuilder\CurrencyListBuilder::$currentUser in Drupal\mcapi\ListBuilder\CurrencyListBuilder->load() (ligne 90 de /home/.../dev/mutual_credit/modules/mutual_credit/src/ListBuilder/CurrencyListBuilder.php).

and

Error : Call to a member function hasPermission() on null in Drupal\mcapi\ListBuilder\CurrencyListBuilder->load() (ligne 90 de /home/.../dev/mutual_credit/modules/mutual_credit/src/ListBuilder/CurrencyListBuilder.php).

I looked into line 90 and it uses $this->currentUserfor the current user. I replaced with

    $user = \Drupal::currentUser();
    if ($user->hasPermission('manage mcapi')) {

and now it works.

Do you have the same problem when going to the currencies admin page?

Would you like me to create an issue for this so that we have follow-up and add a patch there?

matslats’s picture

I'm not too good with patches and tend to integrate them manually.
I've done a lot of work and will push something high quality in the next
24 hours then I'll be busy on other things for a while and its a good
time for you to play with it..
I've got both of those bugs thanks

alauzon’s picture

@matslats
Could you give me write access to git once it's done?

matslats’s picture

OK I pushed beta 2 and gave you write access.
Can you be meticulous about pushing one change at a time until I'm confident in your abilities?
By the way Please watch this - this is the project manager and developer of http://community-exchange.org, which we are replacing.
https://www.youtube.com/watch?v=zSOTVfNe54A
He and I are working together all this month.
Cheers