tomasnorre/crawler

PHP warning: undefined array key uid and username

Closed this issue · 7 comments

Bug Report

Current Behavior
some thousand log entries at one shot when the scheduler task "crawler:processQueue --amount=150 --sleepafter=10 --sleeptime=30" is running, started with the scheduler or CLI

this behaviour is since the PHP update 7.4 to 8.1

Expected behavior/output
no log entries

Steps to reproduce
the steps are identically as descriped in ticket #1012
please see also ticket #1014

Environment

  • Crawler version(s): 11.0.7
  • TYPO3 version(s): 11.5.33
  • PHP: 8.1.26
  • Is your TYPO3 installation set up with Composer (Composer Mode): no

Possible Solution
I don't know
Thank you so much for your support

Hi there, thank you for taking your time to create your first issue. Please give us a bit of time to review it.

I think it's that simple that the fix you are referring to here #1012 isn't released yet.

Can you please test with dev-main branch?

Thank you tomasnorre for your immediate reply.

Before I initiated this ticket I had copied the two code lines from ticket 1014 into the file "Classes/Middleware/FrontendUserAuthenticator.php" on my typo3 instance

add line 130 $frontendUser->user[$frontendUser->userid_column] = 0;
add line 131 $frontendUser->user[$frontendUser->username_column] = '';

Despite of that the described error occurred. Now I am not sure, if I must do more actions to prevent the error.

Unfortunately I have no idea to find out how I can use the code in the main branch.

Please could you be so kind to tell me, what files I must transfer to my typo3 instance or which further manually code changes I have to do in order to complete the fix.

Best greetings

You can make a git clone of the main branch, and upload all. I'm currently not working, so cannot help you further, sorry.

I made a git clone and transferred it to my development environment. This was how I installed the main branch:

  • Unzip the zipfile in the crawler extension directory with winscp
  • delete one slash in the file ext_localconf.php to avoid a 503 error in the path name
  • add the directory "vendor" in the directory "/html/typo3/typo3conf/ext/crawler/Resources/Private/Php/Libraries"; the source was my backup directory with the previous installed extension
  • flush typo3 and PHP caches

To test the installation I ran the crawler by starting the scheduler job manually. The two logfile messages occurred again (undefined array key "username" and "uid") in a great number.

For the second test I deleted the VAR-directory.

Maybe there is still a library missing for the buxfix because I don't use composer? I understand that you can't reply immediately. That doesn't matter. Thank you.

Perhaps try the TYPO3 Crawler Slack channel, on the official TYPO3 Slack.
https://typo3.org/community/meet/chat-slack

I have just released a version 11.0.8 of the TYPO3 Crawler which should contain the fixes from above. I'll close the issue for now. Please let me know if not fixed in the newest release.

https://github.com/tomasnorre/crawler/releases/tag/11.0.8