-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug and resulting Php Warnings with not translated mount points #1059
Comments
Hi there, thank you for taking your time to create your first issue. Please give us a bit of time to review it. |
Thanks for your bug report, if you could provide a test that proves that the code is currently wrong that would be great, and even better if a fix could be provided too. |
Thanks a lot, will look into it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Current Behavior
We get with every run of crawler task "buildQueue" a lot of errors releating to mound points.
E.g.
Core: Error handler (BE): PHP Warning: Trying to access array offset on value of type null in tomasnorre/crawler/Classes/Controller/CrawlerController.php line 725
Core: Error handler (BE): PHP Warning: Undefined array key 0 in tomasnorre/crawler/Classes/Controller/CrawlerController.php line 725
We get this errors for line 729 and 740 too. I think this error also concers line 741.
I think mount pages are not indexed correctly with this bug in method getPageTreeAndUrls.
Expected behavior/output
No undefined array key error and correct indexing of mount pages
Steps to reproduce
Start task "buildQueue" in scheduler for root page which including not translated mount pages.
Environment
Possible Solution
In method getPageTreeAndUrls for affected lines it needs to be checked if variable $mountpage has array key 0. I think the reason is that mount pages have no language overlays and with this no array key 0. In our case $mountpage are not translated and variable $mountpage is array with all necessary data like mount_pid etc.. Therefore $mountpage at key 0 not exists and resulting value is null. With e.g. $mountpage['mount_pid'] I think we will get expected result for getPageTreeAndUrls. This have to be fixed / checked for other lines too.
The text was updated successfully, but these errors were encountered: