Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 27 21:15

    cundd on v5

    Remove doctrine/dbal downgrade … (compare)

  • Sep 27 21:14
    cundd commented #70
  • Sep 27 21:14
    cundd closed #70
  • Sep 27 21:14
    cundd closed #71
  • Sep 27 21:14

    cundd on v5

    Add PSR-14 event handling for t… add all reponse headers to the … Add `DispatcherFactory` to buil… and 4 more (compare)

  • Sep 27 21:12
    Travis cundd/rest (FlorianX-v5) fixed (671)
  • Sep 27 21:09
    cundd synchronize #71
  • Sep 27 21:09

    cundd on FlorianX-v5

    Make the `EventDispatcher` opti… (compare)

  • Sep 27 21:05
    Travis cundd/rest#71 broken (670)
  • Sep 27 21:05
    Travis cundd/rest (FlorianX-v5) still failing (669)
  • Sep 27 21:01
    cundd synchronize #71
  • Sep 27 21:01

    cundd on FlorianX-v5

    Fix construction of the Dispatc… (compare)

  • Sep 27 20:47
    cundd opened #71
  • Sep 27 20:47
    Travis cundd/rest (FlorianX-v5) failed (668)
  • Sep 27 20:44

    cundd on FlorianX-v5

    Add PSR-14 event handling for t… add all reponse headers to the … Add `DispatcherFactory` to buil… and 1 more (compare)

  • Sep 23 13:17
    cundd commented #70
  • Sep 23 12:57
    Travis cundd/rest#70 broken (667)
  • Sep 23 12:53
    FlorianX opened #70
  • Jul 15 16:17

    cundd on v5

    Register TypoScript files for `… (compare)

  • Jul 15 14:11

    cundd on v5

    Fix wrong table name in person … (compare)

Robert Wildling
@rowild
And actually, a little lower in that documentation, it says that „replace“ … „self.version" is deprecated also and can cause troubles with composer 2.
This message was deleted
Ahh… your version is correct! ("Must use a vendor/package_name“). So, no: not deprecated!
Daniel Corn
@cundd

I hope I didn’t push you too much now!

Some little pushes are good to keep the project alive ☺️

Robert Wildling
@rowild
Bildschirmfoto 2021-07-15 um 16.01.24.png

Howdy, Daniel! Started playing around with the custom_rest ext. When creating a person in the BE, an error occurs:

(1/1) #1439569743 UnexpectedValueException
Field l10n_parent of table tx_customrest_domain_model_person reference to foreign table tx_customrest2_domain_model_person, but this table is not defined in TCA

I assume these stem from speeling errors in the TCA (see screenshot)

Or would it really be necessary to create a second table with the same schema?
Creating a person works when fixing those 4 appearances of tx_customrest2_domain… so I’d assume creating a 2nd table is not the way to go. If those fixes are indeed the solution, let me know. I’d be happy to provide a PR!
Robert Wildling
@rowild
However, if I add this /rest/cundd-custom_rest-person to my URL, I get {"error":"Forbidden“} (ext installed, 2 TypoScript added, /rest provides a nice greeting, so that works…)
Daniel Corn
@cundd
Oh tx_customrest2_domain... is an error of course... I really need to check the extension :(
Robert Wildling
@rowild
I’ll help you :-)
Daniel Corn
@cundd
:)
The URL should actually work. Can you go into the TYPO3 backend under Reports. There in the dropdown is a REST tool
Robert Wildling
@rowild
Bildschirmfoto 2021-07-15 um 16.17.53.png
Seems I am missing out on sth. The route is not shown.
Daniel Corn
@cundd
does the TypoScript contain plugin.tx_rest.settings.paths.cundd-custom_rest?
I think custom_rest is missing something like
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
            'custom_rest',
            'Configuration/TypoScript',
            'Custom Rest Configuration'
        )
would you mind testing the patch?
Robert Wildling
@rowild
I was just fooling around with Overrides/sys_template.php and addStaticFile :)
I will: Feedback in a moment
The TS from custom_rest can be included now, the Report shows a whole new category with routes.
I try /rest/cundd-custom_rest-person/firstname/Donny, but the result is []
Robert Wildling
@rowild
Hmmm… tried lastname and bithday as well (of course I have to data sets, „Geraldine Chaplin“ and „Donny Darqco“), but the result is always an empty array… Is that to be expected?
/show/1 DOES return JSON: {"firstName":"Donny","lastName":"Darquo","pid":7,"uid":1}, but without birthday
Robert Wildling
@rowild
…and also /rest/cundd-custom_rest-person/ returns an empty array. (This should translate to the repo's listAction => findAll(), right?)
Daniel Corn
@cundd
Sorry, I was away.
Robert Wildling
@rowild
That is your very good right! :-)
Daniel Corn
@cundd
:D
Could you try to set the persistence.storagePid of the extension?
plugin.tx_customrest.persistence.storagePid = ...
I think the repository doesn't know on which page to search for the records
Robert Wildling
@rowild
I just tried that (also with tx_rest. since ty_customrest is nowhere in use...), but to no avail. Are you sure this is the reason? Because when searching by birthday, data records are found...
Just to make sure: there is NO need to add a plugin to a page, right? (A plugin is offered, which I implemented and where I also assigned the folder with id 7; but that didn’t change anything).
Bildschirmfoto 2021-07-15 um 17.41.32.png
Daniel Corn
@cundd
A really? /cundd-custom_rest-person/birthday/ does work?
Robert Wildling
@rowild
No, sorry. My mistake!!!
Daniel Corn
@cundd
I think it's the case, because findByUid() ignores the storage pid AFAIK
Robert Wildling
@rowild
But why is the field birthday not recognized? Do you think that a custom implementation of findByUid() is necessary?
BTW: /cundd-custom_rest-person/ leads to a memory overflow (is it that?)
Bildschirmfoto 2021-07-15 um 17.43.42.png
Daniel Corn
@cundd
Try to add the following to the Repository Class
 public function createQuery()
    {
        $q = parent::createQuery(); 
        $q->getQuerySettings()->setRespectStoragePage(false);
        return $q;
    }
That's all a bit strange.
The output of the Controller based methods are managed by \TYPO3\CMS\Extbase\Mvc\View\JsonView
I'm not sure how that works. It was a contribution...
Robert Wildling
@rowild
Quick question: Does the setup work on your side? Because if it does, I have messed up and need to restart...
Daniel Corn
@cundd
I need to check that 😥Maybe I should remove the Extbase-stuff ...
Robert Wildling
@rowild
BTW: settings set RespectStoragePage to false worked, I now get a JSON object returned when asking for a firstname
Bildschirmfoto 2021-07-15 um 18.19.20.png
The birthday is still missing, though...
Andrii
@maaraanas_twitter
Hey guys, is it possible to use this REST extension to access articles tree / articles itself etc
Daniel Corn
@cundd
Hi @maaraanas_twitter! Support to access Pages and Content is not publicly available yet (https://rest.corn.rest/_Initiatives/Headless/)