- Issue created by @earthangelconsulting
- ๐จ๐ฆCanada earthangelconsulting
also, the first time i tried this did not occur, but the second time, the log file also had multiple occurrences (about 20?) of this error:
Message Warning: Undefined property: stdClass::$revision_id in search_fields() (line 240 of xxx/web/modules/contrib/find_text/find_text.module)
- Assigned to abhishek_virasat
- ๐บ๐ธUnited States duckydan
I ran into this exact thing. I think it is assuming the site uses a Workflow for content.
- ๐บ๐ธUnited States duckydan
If I change that area to this:
//Check the published status. if ($node->isPublished()) { $status = 'Published'; } else { $status = 'Not Published'; }
This it works great for me. I realize that messes things up for people who want to see the Workflow Moderation state, so it's not a real fix.
- ๐จ๐ฆCanada earthangelconsulting
thanks @duckydan, i will try that later today, if it works, you are my hero! :-)
- ๐จ๐ฆCanada earthangelconsulting
i tried what @duckydan suggested and it did not work for me, unfortunately.
i get a different error, in the same piece of code
Error: Call to a member function isPublished() on null in Drupal\find_text\Form\SearchForm->buildResultsTable() (line 247 of /var/www/html/web/modules/contrib/find_text/src/Form/SearchForm.php)it seems that $node in the following line
if ($node->isPublished()) {
is null
i looked at the immediately surrounding code, to see if we could just add a conditional for that, but from what i could see it made no sense for $node to be null in any "normal" situation.
i am admitting defeat for now, hope someone else can figure this out!
- ๐บ๐ธUnited States themarkahrens
mytungsten โ made their first commit to this issueโs fork.
- @mytungsten opened merge request.
- ๐บ๐ธUnited States themarkahrens
I think I have a fix for both the Field moderation_state is unknown and Undefined property: stdClass::$revision_id errors. I just pushed an update to the dev version if folks want to test that out.
- Status changed to RTBC
about 1 year ago 8:22pm 13 October 2023 - ๐จ๐ฆCanada earthangelconsulting
well, it's interesting that duckydan and i keep getting different results, there must be something about their data that is different?
i am using the latest dev version, (i upgraded by doing this: composer require 'drupal/find_text:1.x-dev@dev' ) ... and now i get this error:
Message Error: Call to a member function hasField() on null in Drupal\find_text\Form\SearchForm->buildResultsTable() (line 247 of /var/www/html/web/modules/contrib/find_text/src/Form/SearchForm.php)
- ๐จ๐ฆCanada earthangelconsulting
still, we are making progress here :-) thanks all!
- Status changed to Fixed
4 months ago 6:01pm 6 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.