PKP PLN Plugin produce error

Description of issue or problem I’m having:
The pln plugin got error and stuck because it cannot create folder, but it can create the pln directory inside.

Steps I took leading up to the issue:
checking the php error log got error

What I tried to resolve the issue:
checking for folder permission all is ok. the php pear all is ok

Application Version - e.g., OJS 3.1.2:
ojs 3.3.0.8

Additional information, such as screenshots and error log messages if applicable:
plnplugin

the plug in can create the folder inside

[2021-09-21 19:13:20] https://myjournal
[2021-09-21 19:13:20] [Notice] Task process started.
[2021-09-21 19:13:20] [Notice] PLN Depositor executeActions started
[2021-09-21 19:13:20] [Notice] Depositor processing for myjournal
[2021-09-21 19:13:20] [Notice] Getting service document.
[2021-09-21 19:13:21] [Notice] Processing deposit status updates.
[2021-09-21 19:13:21] [Notice] Processing updated content.
[2021-09-21 19:13:21] [Notice] Processing new content.
[2021-09-21 19:13:21] [Notice] Packaging content for deposit.
[2021-09-21 19:13:21] [Notice] Trying package deposit 1 (Issue: 1) (Local Status: [New], Processing Status: [Unknown], Lockss Status: [Unknown])

pln task log end here and not finish

[21-Sep-2021 19:13:21 ] PHP Fatal error:  Uncaught whikloj\BagItTools\Exceptions\FilesystemException: Unable to create directory G:\inetpub\wwwroot\myfilesfolder\G:\inetpub\myfilesfolder\journals\1\pln\8BAC0EC8-537C-4CFE-892C-D7EB04512E3B\8BAC0EC8-537C-4CFE-892C-D7EB04512E3B\data in G:\inetpub\wwwroot\myfilesfolder\plugins\generic\pln\vendor\whikloj\bagittools\src\BagUtils.php:268
Stack trace:
#0 G:\inetpub\wwwroot\myfilesfolder\plugins\generic\pln\vendor\whikloj\bagittools\src\Bag.php(1180): whikloj\BagItTools\BagUtils::checkedMkdir()
#1 G:\inetpub\wwwroot\myfilesfolder\plugins\generic\pln\vendor\whikloj\bagittools\src\Bag.php(289): whikloj\BagItTools\Bag->createNewBag()
#2 G:\inetpub\wwwroot\myfilesfolder\plugins\generic\pln\vendor\whikloj\bagittools\src\Bag.php(307): whikloj\BagItTools\Bag->__construct()
#3 G:\inetpub\wwwroot\myfilesfolder\plugins\generic\pln\classes\DepositPackage.inc.php(270): whikloj\BagItTools\Bag::create()
#4 G:\inetpub\wwwroot\myfilesfolder\plugins\generic\pln\classes\DepositPackage.inc.php(540): DepositPackage->generatePackage()
#5 G:\inetpub\wwwroot\myjournalshortname in G:\inetpub\wwwroot\myfilesfolder\plugins\generic\pln\vendor\whikloj\bagittools\src\BagUtils.php on line 268

the php error indicate file permission but all the permission already there and the system can create the folder inside the pln directory

it can create the folder pln>8BAC0EC8-537C-4CFE-892C-D7EB04512E3B but cannot create the folder inside 8BAC0EC8-537C-4CFE-892C-D7EB04512E3B>8BAC0EC8-537C-4CFE-892C-D7EB04512E3B>data. the bold folder it cannot create

more weird issue is one of the issue is completed although the pln task never finish…
pln complete

i manage to resolve the folder permission. there is no error in the php log… but the plugin is still not finish.

[2021-09-21 19:13:20] https://myjournal
[2021-09-21 19:13:20] [Notice] Task process started.
[2021-09-21 19:13:20] [Notice] PLN Depositor executeActions started
[2021-09-21 19:13:20] [Notice] Depositor processing for myjournal
[2021-09-21 19:13:20] [Notice] Getting service document.
[2021-09-21 19:13:21] [Notice] Processing deposit status updates.
[2021-09-21 19:13:21] [Notice] Processing updated content.
[2021-09-21 19:13:21] [Notice] Processing new content.
[2021-09-21 19:13:21] [Notice] Packaging content for deposit.
[2021-09-21 19:13:21] [Notice] Trying package deposit 1 (Issue: 1) (Local Status: [New], Processing Status: [Unknown], Lockss Status: [Unknown])

the status log still the same like this.
i have verified pear is installed and working. no error in php log.

Hi @mohd_arshad,
I am facing the same problem in OJS 3.3.0.8. I have made some changes in the code to work around this issue but it keeps breaking up again. Did you solve this problem? Please help me if you did.
Thanks.

Hi @mohd_arshad!

The plugin is using the package GitHub - whikloj/BagItTools: A PHP BagIt library to create BagIt files, but looks like it doesn’t work very well under Windows, the author assumed some incorrect things about the running operational system.

I’ve created an issue to investigate it here: Possible problem to generate deposits on Windows · Issue #26 · pkp/pln · GitHub

Best,
Jonas

Update: I’ve fixed the issues I had with the package in my Windows environment, and submitted a fix for the author here: Path issues on a Windows environment · Issue #45 · whikloj/BagItTools · GitHub

Best,
Jonas

Hi!

My fixes to the BagItTools have been merged, so it should work under Windows. I’ve created pull requests to update the plugin here: Problem to generate deposits on Windows · Issue #26 · pkp/pln · GitHub

I’m not sure when we’ll release a new version for the plugin gallery, so until there, a temporary fix is to download the code with the fixes and install it using the instructions from the file README.md.

I fully indicate to just wait for a plugin update from the plugin gallery, unless you’re in a hurry to get the content preserved (e.g. if your journal is going to be closed).

Best,
Jonas