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

TCEMAIN preview core functionality? #737

Open
kanow opened this issue Feb 15, 2023 · 5 comments
Open

TCEMAIN preview core functionality? #737

kanow opened this issue Feb 15, 2023 · 5 comments

Comments

@kanow
Copy link

kanow commented Feb 15, 2023

Is it possible to use an "View" button in backend to get a preview of the current event?

I tried to configure this TCEMAIN.preview stuff in page ts config. I use the following page ts:

TCEMAIN.preview {
  tx_calendarize_domain_model_event {
#    previewPageId = 123
    useDefaultLanguageRecord = 0
    fieldToParameterMap {
      uid = tx_calendarize_calendar[event]
    }
    additionalGetParameters {
      tx_calendarize_calendar.action = detail
      tx_calendarize_calendar.controller = Calendar
    }
  }
}

The button is generated but if I use the View Button a new page will be opened with an exception

(1/1) TypeError
Argument 1 passed to HDNET\Calendarize\Utility\EventUtility::getOriginalRecordByConfiguration() must be of the type array, null given, called in /app/web/typo3conf/ext/calendarize/Classes/Controller/CalendarController.php on line 102

any Idea?

@lochmueller
Copy link
Owner

Hey @kanow ,
do you use the EXT:calendarize event or a custom event type? Do you try to set also the "extensionConfiguration" argument to force rendering the right configuration: https://github.com/lochmueller/calendarize/blob/master/Classes/Controller/CalendarController.php#L91
Regards,
Tim

@kanow
Copy link
Author

kanow commented Feb 15, 2023

Hey what a quick response :-)

I use the calendarize Event. And yes, with setting

additionalGetParameters {
      tx_calendarize_calendar.action = detail
      tx_calendarize_calendar.controller = Calendar
      tx_calendarize_calendar.extensionConfiguration = Event
    }

the View button works. But I thought that can be a preview for the record without saving? After clicking the View Button I choosed the followed option "View without changes" but then I have another error:

(1/1) TypeError
Argument 1 passed to HDNET\Calendarize\Domain\Repository\IndexRepository::findByEventTraversing() must implement interface TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface, null given, called in /app/web/typo3conf/ext/calendarize/Classes/Controller/CalendarController.php on line 103

If I choose "Save changes and view" the event is already visible in my list view on the website. That's not what I want.
Or should I use another value for extensionConfiguration argument?
Thanks for your help.

@kanow
Copy link
Author

kanow commented Feb 16, 2023

Mmmh.. I think it's not possible to use those preview feature for a preview and hidden in the current list view. Is just possible to go directly to the detail page for those entry. Issue can be closed if nobody has another idea.

In news there is an setting to allow preview of hidden records. That would help if there is such a setting in calendarize. Is there a setting for this in calendarize, maybe in pluginConfiguration?

@lochmueller
Copy link
Owner

No. There is no such settings currently (as far as I know :))

@kanow
Copy link
Author

kanow commented Mar 17, 2023

OK, thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants