Skip to content

Conversation

tomasnorre
Copy link
Owner

Description

This is a PR idea that might solve the problem with issue #1137 at the end, this is still rough WIP, but wanted some feedback.

I have

  • Checked that CGL are followed
  • Checked that the Tests are still working
  • Added description to CHANGELOG.md (github-handle is optional)
  • Added tests for the new code

@tomasnorre
Copy link
Owner Author

@cweiske As you are currently quite active, which I highly appreciate, do you have an suggestion/feedback/opinion on this PR?

And if you like the approach could you help me get the tests green again?

@cweiske
Copy link
Contributor

cweiske commented Aug 28, 2025

At first I thought that a simple variable in the CrawlerInitialization class could be used instead of applicationData, but as I see it, the problem is that other extensions have to be able to communicate their success to crawler somehow.
Writing applicationData was an easy way to do that without having to know if crawler is installed at all.

With the removal of applicationData, extensions must to be adjusted, in one way or another. In this case, crawler could provide an API method for the other extensions and would not need to rely on the request attributes at all.

My suggestion would be a static method e.g. CrawlerInitialization::extensionSuccess($key, $status) that other extensions would need to call instead setting $GLOBALS['TSFE']->applicationData['tx_crawler']['success'][$key] = true. This would need to be wrapped in a if (class_exists()) call of course.

@tomasnorre
Copy link
Owner Author

Thanks for your input, I'll take that into consideration. I don't have a solution/final idea myself yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants