Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 12 09:31

    cundd on 5.0.0

    (compare)

  • Jun 12 09:30

    cundd on v5

    Raise version number to 5.0.0 (compare)

  • Jun 01 11:41
    cundd commented #68
  • Jun 01 11:41

    cundd on v5

    Update CacheFactory.php Since … Merge pull request #68 from Flo… (compare)

  • May 21 10:04
    Travis cundd/rest (v5) passed (659)
  • May 21 10:02
    Travis cundd/rest (v5) passed (659)
  • May 21 10:01
    Travis cundd/rest (v5) passed (659)
  • May 21 09:55

    cundd on v5

    Streamline the Travis build mat… (compare)

  • May 21 09:46

    cundd on v5

    Fix bug in the Doctrine downgra… (compare)

  • May 21 09:42
    Travis cundd/rest (v5) still failing (657)
  • May 21 09:33
    Travis cundd/rest (5.0.0-rc2) failed (656)
  • May 21 09:32

    cundd on v5

    Downgrade doctrine/dbal to 2.11… (compare)

  • May 21 09:24
    Travis cundd/rest (v5) broken (655)
  • May 21 09:17

    cundd on 5.0.0-rc2

    (compare)

  • May 21 09:14

    cundd on v5

    Add draft to populate the Langu… Patch the Context with a custom… Enhance the handling of Sites w… and 4 more (compare)

  • May 14 10:05
    Travis cundd/rest (feature/language-handling-typo3v10) still failing (654)
  • May 14 09:55

    cundd on language-handling-typo3v10

    Create the Language Aspect for … Cleanup V9 Core Bootstrap code Format code in the Test Configu… (compare)

  • May 12 22:12
    Travis cundd/rest (feature/language-handling-typo3v10) still failing (653)
  • May 12 22:02

    cundd on language-handling-typo3v10

    Patch the Context with a custom… Enhance the handling of Sites w… Make the Error Handler check if… (compare)

  • May 11 13:04
    Travis cundd/rest@e03a4f2 (feature/language-handling-typo3v10) failed (652)
Daniel Corn
@cundd
👍😊
Daniel Gro
@dgr_4ap_gitlab

Hey Daniel,
how are you doing?!

I would like to ask you if you got any technical feedback on your REST RC from my developer colleague. He moved to another internal dev team, so I'm stay less in contact to him.

Best regards,
Daniel

Daniel Corn
@cundd

@dgr_4ap_gitlab hy Daniel!
I'm doing fine. I hope you too!

I received no feedback yet. Maybe hearing nothing means, nothing is broken :D

Lukas Kamber
@falcopellegrino_gitlab

Hello Daniel,
I have your REST extension already running in production mode in a V8 and V9 and like it very much. So first of all thanks a lot.
Now I'm strugglinh with a new project in Typo3 V 10.4.14. I am extension developer myself and very happy to help in finding the problem and testing it.

I first installed REST V4 as I did not know it would not run. I always got a 404. The site is running with pretty URLs.
We have a extension where we put all the site configuration, templates etc.

Then I found this chat room here :)
I upgraded my installation

"require": {
"cundd/rest": "^5-dev"
}

and I now have REST 5.0.0-rc1 installed.

Cleared all the caches and did composer dumpautoload where rest appears.

Unfortunately, I still get the same 404 error (Apache based) and es mentioned above, .htaccess is in place and pretty URLs word.

Can you give me a hint where I could start debugging? I'm also happy to give you an URL or other access for testing purposes.

Thanks in advance, Lukas

Daniel Corn
@cundd
Can you tell me more about "404 error (Apache based)"? Is Apache sending the 404?
Lukas Kamber
@falcopellegrino_gitlab
Yes:
Status404
Not Found
VersionHTTP/2
Übertragen14.99 KB (64.98 KB Größe)
Daniel Corn
@cundd
if you add the slash you see the rest message:https://eglionline.cyon.site/rest/
Lukas Kamber
@falcopellegrino_gitlab
OMG
THX!
Quick other question about your extension: How can a raw JSON payload be handled in a POST request?
Did not find anything in docs or examples
eg sending a raw body in Postman: {"foo":"bar"}
Daniel Corn
@cundd
You can access the decoded data with $request->getSentData(),
Lukas Kamber
@falcopellegrino_gitlab
awesome, thanks!
Daniel Corn
@cundd
no problem
Stephan Brun
@sneopu
Hi Daniel
Our customer, FFHS, has the rest extension successfully in use on TYPO3 v10. It's still the dev-Version (5.0.0-dev). Is there something like a roadmap? When do you think you would make a official release for v10?
Daniel Corn
@cundd
Hi @sneopu Since v5 got some more testing in the meantime I think I can release an official version soon
Stephan Brun
@sneopu
@cundd This sounds greet.
Daniel Corn
@cundd
:+1: Thank you for the pull request you sent
Stephan Brun
@sneopu

@cundd I have another question on translations.
I have translated records. If call "rest/" there is the translated welcome message. But when I call "rest/foo-foo_bar_baz-cheese/13208 I only get the record in the default language. I made the typoscript settings:

plugin.tx_rest.settings{
    languages {
        de = 0
        fr = 1
    }

Something else I need to do?

Daniel Corn
@cundd
Did you send the Accept-Language header with your request?
Justin
@Azazel1333

I'm trying to send parameters VIA a get request using GET parameters in the URL. In the custom handler, I can't seem to read this data. I'm trying to send the request using:
https://domain.ca/rest/api/course/?limit=1

It works fine if I do something like this instead:
https://domain.ca/rest/api/course/1

I'm guessing in the validation something is preventing this from being possible or that my configuration is incorrect.

The route I'm using to accept this request is:
Route::get($request->getResourceType() . '/course/{slug}', function (RestRequestInterface $request, $slug) { ... }

I'm using typo3 v10 with rest-5.

Thanks!

Justin
@Azazel1333
Of course after hours of attempts and finally caving and asking here - Moments later I find a solution. If I use {raw} instead of {slug} and encode the URL before sending it (not sure why I wasn't before) I can then decode and parse the parameters as needed.
Stephan Brun
@sneopu
rest_fr_t3_header.png
rest_fr_t3.png
Yes. I send the Header "Accept-Language" "fr". It's on a TYPO3 v9.5.26 and REST on v5-dev.
A little bit "special" on the site config is different baseurls on the languages. But the greeting example works great.
Daniel Corn
@cundd
@Azazel1333 IIRC the GET parameters don't need to be mapped in the request path. Just match the path and use getQueryParams() on the Request object
@sneopu the loading of the language is done in https://github.com/cundd/rest/blob/v5/Classes/Bootstrap/AbstractLanguageBootstrap.php#L26-L35. I am not sure what the problem could be. Are none of your objects translated, or maybe only the child-objects?
Stephan Brun
@sneopu

I dont see, what I doing wrong. I made now a simpler test setup on TYPO3 v10 with news.
Request of "https://v10.ddev.site/rest/georg_ringer-news-news/" with header "Accept-Language: fr" will result in the non-translated record.
Request of "https://v10.ddev.site/rest/" delivers a translated "hello" message.
return $request->withAttribute('language', $language); in AbstractLanguageBootstrap Line 36 is called with the French Language Object, which is correct in my opinion.

My sites config:

base: /
languages:
  -
    title: Deutsch
    enabled: true
    languageId: 0
    base: /
    typo3Language: de
    locale: de_CH.UTF-8
    iso-639-1: de
    navigationTitle: Deutsch
    hreflang: de-ch
    direction: ltr
    flag: ch
    websiteTitle: 'v10 Deuutsch'
  -
    title: FR
    enabled: true
    base: /fr/
    typo3Language: fr
    locale: fr_CH
    iso-639-1: fr
    websiteTitle: 'Freeench v10'
    navigationTitle: FrançaisF
    hreflang: fr
    direction: ''
    fallbackType: strict
    fallbacks: ''
    flag: fr
    languageId: 1
rootPageId: 1
websiteTitle: ''

Any idea?

test_rest_news_fr.png
Daniel Corn
@cundd
hmm. It would be interesting to know what language UID Extbase uses
I think $querySettings->getLanguageUid() is the key here...
Do you have a chance to look into: \TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend::overlayLanguageAndWorkspace line 630 and print $languageOfCurrentRecord and $languageUid?
Daniel Corn
@cundd
@sneopu thank you for sharing your insight
Stephan Brun
@sneopu
@cundd $languageOfCurrentRecord and $languageUid are both 0
Daniel Corn
@cundd
Ok. that describes why we only get the original records 😕
Stephan Brun
@sneopu
Yes, only original records. The constructor of the LanguageAspect has also 0 for the (language) $id. But this should getting overriden later by the rest-extension?
Daniel Corn
@cundd
Stephan Brun
@sneopu
Same thing happens with the "fr" in the url. I get only the german records. Do the things work in your test environment?
Could you send me a copy of your site config?
Daniel Corn
@cundd
I now had a deeper look at the problem. It indeed does not work. It looks like I have to modify the Language Aspect somehow
Stephan Brun
@sneopu
Thanks a lot for your investigations. With this change it seems to work when requesting "fr/rest/georg...", but not with the Header "Accept-Language"
Daniel Corn
@cundd
What would be your preferred way to request a specific language? "Accept-Language" or URL-based?
Stephan Brun
@sneopu
For my usecase url-based is totally fine. But if you prefer the header this also okay for me. Important is the possibilty to choose a language ;-)
Daniel Corn
@cundd
I just pushed a new change to the language-handling branch. That should also allow the selection via the Accept-Language header
As long as the languages are mapped in TypoScript (https://rest.corn.rest/FAQ/#internationalization-and-localization)
Stephan Brun
@sneopu
Hi Daniel, i tested with the latest version from git "f2bac18". It works like a charm with Accept-Language header ... or URL-based ...
as i can see you changed things also for TYPO3 v9 ... so i did some successful tests on v9 ... thanks a lot for your work
Daniel Corn
@cundd
Hi Stephan
Thank you for your feedback and thank you for telling me about the issue. Your help was very precious