osclass / Osclass

With Osclass, get your own classifieds site for free. Build your own Osclass installation and start advertising real estate, jobs or whatever you want- in minutes!
http://osclass.org/
648 stars 344 forks source link

[regression] CFs/metas are ignored without permalinks #2259

Closed dev-101 closed 6 years ago

dev-101 commented 6 years ago

Filtering by Custom Fields (e.g. tested with simple dropdown CF) does not work anymore without permalinks.

source / info: https://forums.osclass.org/general-help/custom-fields-can-not-search-by-filters!!!/

dev-101 commented 6 years ago

Preliminary testing shows that it is related to these changes here:

https://github.com/osclass/Osclass/commit/2d2d03589fa1ffde84b0935c6c1fdbd2eb83e82d#diff-d6335c50f2d0536514781dc51d34f72a https://github.com/osclass/Osclass/commit/fdc1535cba99e893103f3c3f4da5227ea7a621e2#diff-d6335c50f2d0536514781dc51d34f72a

https://github.com/osclass/Osclass/commit/0dfcea71a53b2b8b090e5846b53e26dca7fe8d66#diff-d6335c50f2d0536514781dc51d34f72a

Reverting to Rewrite class from Osclass 3.6.1 seems to fix the problem (while permalinks are off).

However, this really needs testing in all possible scenarios to make sure nothing else is broken in the meantime.

garciademarina commented 6 years ago

Thanks @dev-101 I will take a look.

garciademarina commented 6 years ago

I think I found out the issue... I will need some testing.

moving $this->extractParams($request_uri); from line 166, one line up. extractParams it's need only if permalinks are enabled, so you extractParams shoud be inside if(osc_rewrite_enabled()) {

https://github.com/osclass/Osclass/blob/master/oc-includes/osclass/classes/Rewrite.php#L166

Can someone test it a bit ? ( @dev-101 )

dev-101 commented 6 years ago

Yes, I can confirm that it is working. This was in fact my original thought at first, to restrict it for permalinks only, but because of some other issues, I got focused on extractParams instead. Thanks!

garciademarina commented 6 years ago

@dev-101 thanks for your help as always