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

Searching in SMF Admin gives error in log #5558

Closed
lurkalot opened this issue Mar 30, 2019 · 11 comments
Closed

Searching in SMF Admin gives error in log #5558

lurkalot opened this issue Mar 30, 2019 · 11 comments
Labels
Milestone

Comments

@lurkalot
Copy link

@lurkalot lurkalot commented Mar 30, 2019

RC2

Searching in SMF Admin gives me a error in log, but the search still works.

Type of error: Critical
The selected search API the forum is using is out of date - falling back to standard search. Please check file SearchAPI-Standard.php. http://localhost/testrc2/index.php?action=admin;area=search

@albertlast
Copy link
Collaborator

@albertlast albertlast commented Mar 30, 2019

Which fulltext search you use?
None
Custom
Fulltext

Did you rebuild it after upgrade?

@mastum
Copy link

@mastum mastum commented Mar 30, 2019

I also have same error, I'm using "None".

@SychO9
Copy link
Contributor

@SychO9 SychO9 commented Mar 30, 2019

it's just the version number in the search api files hasn't been changed from RC1 to RC2

@albertlast
Copy link
Collaborator

@albertlast albertlast commented Mar 30, 2019

Class-CacheAPI got some rc1 too:

protected $version_compatible = 'SMF 2.1 RC1';
/**
* @var string The minimum SMF version that this will work with
*/
protected $min_smf_version = 'SMF 2.1 RC1';

SearchAPI:

public $version_compatible = 'SMF 2.1 RC1';
/**
* @var string The minimum SMF version that this will work with
*/
public $min_smf_version = 'SMF 2.1 RC1';

@Sesquipedalian

@lurkalot
Copy link
Author

@lurkalot lurkalot commented Mar 30, 2019

Apologies for my loud text in the above report, It was a simple copy and paste, not idea why it did that.

Thanks for finding the cause of the error.

live627 added a commit to live627/SMF2.1 that referenced this issue Mar 30, 2019
@Sesquipedalian
Copy link
Member

@Sesquipedalian Sesquipedalian commented Mar 31, 2019

I find myself wondering why we even have those minimum version checks for the search and cache APIs.

@albertlast
Copy link
Collaborator

@albertlast albertlast commented Mar 31, 2019

I guess for mods,
so when they add addtional search and cache stuff,
that smf is able to check if the api (class interface) is the same.

The problem when you want realy to do this,
than is the way correct here,
because the min and current version be different between this two topics.

@illori
Copy link
Contributor

@illori illori commented Mar 31, 2019

I find myself wondering why we even have those minimum version checks for the search and cache APIs.

it is just more locations to forget to update when we do releases and patches. if they are not necessary i think it would good to remove them, or document somewhere that they do exist so we dont forget to update them in the future.

@mastum
Copy link

@mastum mastum commented Mar 31, 2019

Class-SearchAPI.php will be updated for RC2 or do we have to wait for RC3?
Thanks

Sesquipedalian added a commit to Sesquipedalian/SMF2.1 that referenced this issue Mar 31, 2019
The previous way required us to update the $verion_compatible string in Class-SearchAPI.php with every release, in a misguided and ineffective attempt to future-proof against API changes.
Fixes SimpleMachines#5558

Signed-off-by: Jon Stovell <jonstovell@gmail.com>
@Sesquipedalian
Copy link
Member

@Sesquipedalian Sesquipedalian commented Mar 31, 2019

Okay, I've had a chance to look at the relevant code, and my conclusion is that we should just set $version_compatible to 2.1.999 and be done with it.

Performing a min/max version compatibility check is not completely useless, because (1) one day we may need to check for SMF 2.1 vs. SMF 3.0 versions of the search and cache APIs, and (2) third party plugins might need to declare min/max version compatibility ranges for different versions of said plugins. But since our own included plugins and the API itself can and should remain consistent across all versions of 2.1.x, setting the min/max version compatibility range to reflect that is the only move that makes any sense.

@Sesquipedalian
Copy link
Member

@Sesquipedalian Sesquipedalian commented Mar 31, 2019

Class-SearchAPI.php will be updated for RC2 or do we have to wait for RC3?
Thanks

It'll be fixed in RC3. In the meantime, you can manually edit Class-SearchAPI.php to make the change shown in #5559.

@live627 live627 added this to the RC3 milestone Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants