Skip to content
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

Fix _ADDTABLE behavior #1009

Merged
merged 2 commits into from
Mar 7, 2024
Merged

Fix _ADDTABLE behavior #1009

merged 2 commits into from
Mar 7, 2024

Conversation

Hawkeye1909
Copy link
Contributor

We had issues using the _ADDTABLE parameter after upgrading an old installation from v6.7.3 to v10.0.3:

We use configurations like [_TABLE:tx_news_domain_model_news;_ADDTABLE:, sys_category_record_mm;_PID:1;_WHERE: hidden = 0 AND tx_news_domain_model_news.uid = sys_category_record_mm.uid_foreign AND uid_local = 2] to restrict the category for news entries found by the crawler. With your code this results in queries like SELECT uid FROM , , WHERE (pid IN (?)) AND (hidden = 0 AND tx_news_domain_model_news.uid = sys_category_record_mm.uid_foreign AND uid_local = 1). Of course, this will result in an error.

With my changes it is possible to add several additional tables separated by commas. Even our old configuration would work, although the comma at the beginning is no longer needed.

This is only tested with v10.0.3 on TYPO3 v9.5.31 as the upgrade is still in progress...

Description

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

We had issues using the _ADDTABLE parameter after upgrading an old installation from v6.7.3 to v10.0.3:

We use configurations like `[_TABLE:tx_news_domain_model_news;_ADDTABLE:, sys_category_record_mm;_PID:1;_WHERE: hidden = 0 AND tx_news_domain_model_news.uid = sys_category_record_mm.uid_foreign AND uid_local = 2]` to restrict the category for news entries found by the crawler. With your code this results in queries like `SELECT uid FROM , , WHERE (pid IN (?)) AND (hidden = 0 AND tx_news_domain_model_news.uid = sys_category_record_mm.uid_foreign AND uid_local = 1)`. Of course, this will result in an error.

With my changes it is possible to add several additional tables separated by commas. Even our old configuration would work, although the comma at the beginning is no longer needed.

This is only tested with v10.0.3 on TYPO3 v9.5.31 as the upgrade is still in progress...
@stale
Copy link

stale bot commented Jun 19, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the staled label Jun 19, 2023
@tomasnorre tomasnorre removed the staled label Jun 20, 2023
@tomasnorre tomasnorre merged commit a174e52 into tomasnorre:main Mar 7, 2024
5 of 13 checks passed
@Hawkeye1909
Copy link
Contributor Author

@tomasnorre Could you please add this fix also to the v11.x branch?

@tomasnorre
Copy link
Owner

@Hawkeye1909 Yes, I can do so to. It would ease the process if you create a PR for that branch too ;)

Hawkeye1909 added a commit to Hawkeye1909/crawler that referenced this pull request Jul 30, 2024
tomasnorre pushed a commit that referenced this pull request Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants