# |
Feb 13th 2020, 10:18 |
challgren |
And yeah I was looking at the wrong ServerRequest docs |
# |
Feb 13th 2020, 10:18 |
javier.villanueva |
: D |
# |
Feb 13th 2020, 10:17 |
challgren |
IDK you called tech support and like everything in tech it always works when you get support involved! |
# |
Feb 13th 2020, 10:16 |
javier.villanueva |
but why? |
# |
Feb 13th 2020, 10:16 |
javier.villanueva |
mmm... now works |
# |
Feb 13th 2020, 10:16 |
challgren |
You sure your using ServerRequest correctly? |
# |
Feb 13th 2020, 10:15 |
javier.villanueva |
```$referer_params = Router::parseRequest(new ServerRequest(['url' => str_replace(Router::fullbaseUrl(),'',$this->referer())]));``` :_) |
# |
Feb 13th 2020, 10:15 |
challgren |
Im not seeing the full thing |
# |
Feb 13th 2020, 10:03 |
javier.villanueva |
with url without base |
# |
Feb 13th 2020, 10:03 |
javier.villanueva |
@challgren ``` Router::parseRequest(``` |
# |
Feb 13th 2020, 09:57 |
spriz |
Ah yes - it was the ApiListener not doing it's magic @challgren :) |
# |
Feb 13th 2020, 09:56 |
challgren |
Damm |
# |
Feb 13th 2020, 09:55 |
javier.villanueva |
if I create a ServerRequest with my url.... this params area null ,:) |
# |
Feb 13th 2020, 09:50 |
challgren |
Maybe someone else knows a way but thats the only way I can see to do it from a string |
# |
Feb 13th 2020, 09:49 |
javier.villanueva |
thank you |
# |
Feb 13th 2020, 09:49 |
javier.villanueva |
yes... i will try |
# |
Feb 13th 2020, 09:49 |
javier.villanueva |
mm... |
# |
Feb 13th 2020, 09:49 |
challgren |
@javier.villanueva maybe you could create a new ServerRequest and then pass it to Router::reverseToArray() |
# |
Feb 13th 2020, 09:43 |
javier.villanueva |
3 |
# |
Feb 13th 2020, 09:43 |
challgren |
3 or 4? |
# |
Feb 13th 2020, 09:43 |
javier.villanueva |
I have checked Router class... but I didnt find |
# |
Feb 13th 2020, 09:43 |
neon1024 |
Morning all :wave: |
# |
Feb 13th 2020, 09:42 |
javier.villanueva |
but if therer are one for it... |
# |
Feb 13th 2020, 09:42 |
challgren |
Oh I think router has a function |
# |
Feb 13th 2020, 09:42 |
javier.villanueva |
I am creating a function for it |
# |
Feb 13th 2020, 09:41 |
javier.villanueva |
yes! |
# |
Feb 13th 2020, 09:41 |
challgren |
@javier.villanueva are you trying to reverse route the referer? |
# |
Feb 13th 2020, 09:41 |
spriz |
Crap - nope :P |
# |
Feb 13th 2020, 09:40 |
spriz |
I think it's missing Crud API listener :) |
# |
Feb 13th 2020, 09:38 |
spriz |
also response is not in `data` like Crud usually does :thinking_face: |
# |
Feb 13th 2020, 09:38 |
challgren |
Hmm I'm not sure I don't use crud |
# |
Feb 13th 2020, 09:38 |
spriz |
No caching - same even after rebuilding a new docker container |
# |
Feb 13th 2020, 09:38 |
spriz |
I have a hunch that it's some view class or something alike - but it is using JsonView properly |
# |
Feb 13th 2020, 09:37 |
challgren |
Caching? |
# |
Feb 13th 2020, 09:37 |
spriz |
it's even there with debug off :S |
# |
Feb 13th 2020, 09:37 |
challgren |
Debug? |
# |
Feb 13th 2020, 09:36 |
spriz |
I know previously I've had it and it was because something was not loaded/configured correctly but I cannot figure out what it was... Anyone got any ideas? |
# |
Feb 13th 2020, 09:36 |
spriz |
Using Crud and JSON API I started having `"_isSearch": false,` and `"viewVar": "users",` in my JSON response |
# |
Feb 13th 2020, 09:34 |
challgren |
Check your path order in your rc files |
# |
Feb 13th 2020, 09:32 |
challgren |
my guess is the which command was probably built like 10 years ago when PHP 4 was compiled so its probably not really up to date |
# |
Feb 13th 2020, 09:32 |
conehead |
@challgren Yes, that seems to be the problem |