User tests: Successful: Unsuccessful:
Pull Request for Issue #39717.
The indexer in Smart Search currently has situations where errors are returned and instead of gracefully reporting an error, the whole indexing just silently stops and does not proceed. This PR tries to catch all output and notices from finder plugins and return that as properly formatted error. I also removed some unused code.
var_dump($item->title)
.The indexing starts, but shortly after it does not progress any further.
The indexing starts and shortly after an error message is displayed. The whole response can be found in the browser console.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Category | ⇒ | Administration com_finder Language & Strings |
Status | New | ⇒ | Pending |
Labels |
Added:
Language Change
PR-4.3-dev
|
OK this just hides the message and doesn't give us any way to actually fix the problem? Like if there are PHP errors - yes we don't want things to silently fail - but we do want to make sure that they are logged so we can fix them properly in the future rather than just silently swallowing them.
I think George is right.
It probably can be improved in clinet side
joomla-cms/build/media_source/com_finder/js/indexer.es6.js
Lines 162 to 167 in 214119e
Need kind of
let response;
try {
response = JSON.parse(data);
} catch (e) {
Joomla.renderMessages(Joomla.ajaxErrorsMessages(xhr, 'parsererror'));
}
handleResponse(response);
Need to test
I tried the try-catch and had all of that ready, but it made everything a lot uglier. The thing is that you need to have access to the output and that is now properly in the browser console.
I've used this approach because we have most of the necessary code already in there. We have ob_start() everywhere, but we are missing actually suppressing the output.
I will prepare another pr, need some time
They are both valid from my perspective.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-04-18 12:06:39 |
Closed_By | ⇒ | Hackwar | |
Labels |
Added:
bug
|
Status | Closed | ⇒ | New |
Closed_Date | 2023-04-18 12:06:39 | ⇒ | |
Closed_By | Hackwar | ⇒ |
Status | New | ⇒ | Pending |
Title |
|
Title |
|
Labels |
Added:
PR-5.0-dev
Removed: PR-4.3-dev |
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-05-30 11:36:19 |
Closed_By | ⇒ | HLeithner |
thanks
I have tested this item✅ successfully on 8b37e66
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39965.