Skip to content

Fix: catch specific exception and move to the next operation#12

Open
stefanospetrakis wants to merge 11 commits into1.xfrom
improve-plugin-exception-handling
Open

Fix: catch specific exception and move to the next operation#12
stefanospetrakis wants to merge 11 commits into1.xfrom
improve-plugin-exception-handling

Conversation

@stefanospetrakis
Copy link
Copy Markdown
Collaborator

No description provided.

Jurriaan Roelofs and others added 11 commits August 28, 2025 16:55
The renderFullReport method was generating an explicit h2 header that
duplicated the h3 header already provided by the analyze_table theme.
This violates the analyze module design principles and creates
inconsistent heading structure.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
The renderFullReport method was generating an explicit h2 header that
duplicated the h3 header already provided by the analyze_table theme.
This violates the analyze module design principles and creates
inconsistent heading structure.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Previously the AI Sentiments analysis view had no access restrictions.
Now requires proper permission for security compliance.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix line length violations in README.md (lines 3, 8)
- Fix line length violation in analyze_ai_sentiments.install (line 121)
- Fix @return documentation format in AISentimentsAnalyzer.php (line 599)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add Configure settings button to sentiments analysis reports page
- Use hook_views_pre_view with attachment_before for proper rendering
- Match styling and positioning of View reports buttons on settings pages
- Button appears above view content with proper form-actions styling
- Remove unused action links file

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fix duplicate h2/h3 header issue in renderFullReport
Changes from DefaultPluginManager to AnalyzePluginManager to match
other working analyze modules. This resolves batch processing failures
by ensuring the correct plugin manager is used to create analyzer instances.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Reduces batch processing chunk size to handle complex AI analysis
requests that may take longer than other analyze modules, preventing
MySQL connection timeouts during batch operations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Reverts previous change as reducing batch size did not resolve
the timeout issues. Restoring original chunk size of 5 entities.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@stefanospetrakis stefanospetrakis linked an issue Sep 10, 2025 that may be closed by this pull request
@jjroelofs
Copy link
Copy Markdown
Contributor

@stefanospetrakis what is this for?

@stefanospetrakis
Copy link
Copy Markdown
Collaborator Author

@stefanospetrakis what is this for?

Pardon, here are the details, I think this should go in:

Detailed in this PR:

  1. A PluginException was thrown (and caught) that stopped the $context['results']['processed'] from being incremented; this processed counter would remain set to 0.

Arguments for this code change:

  1. Catching any \Exception and continuing with the flow in that method is risky
  2. Specifically, since this is happening inside a set of Batch API operations, the code should consider that exiting from this method is the most appropriate action to allow subsequent operations to be processed and avoid re-entering the same operation, unless this is what the code aims for.

In short: This change defends the code, makes the catch expectation more specific and adds a reaction to that specific expectation.

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.

MySQL timeout during batch analysis - sentiments module only

2 participants