How to set cache to custom module

Hi team

I've created a custom module that has a controller that return a json,
but i would like to set 2 cache for two days,

Could that be posible?
Could you please help me?

Regards
Mario

Content moderation with multiple lanaguage

I have multiple languages (EN,DE,FR) and content moderation is enable. I have two additional status for content moderation one is (Draft, In Review) now problem is currently i have to change the status for each language. in this way quite confusion for content moderator that what left and what done. Could we do something like that content moderation we bring on global level so if its status change for one language same will be implemented for other languages.

Allow user to view their own yet unpublished coments

I wish to allow my users to view their own comments even when the comments are in unpublished state, so that they can edit/update them.

How do I achieve this?

Currently I see that if a comment is unpublished, it does not appears in the 'comments' rendered for non-admin users.

I guess I will need to override some functionality that renders comments.

My guess is that I would need to extend FieldFormatter ...........but I could be wrong.

Can you please point me to any such info?

Please help me.

Thanks

Drupal Local host extensions issues

I'm developping a new Drupal project and i'm doing in locally using XAMPP
I've followed some steps on editing internal values of XAMPP [like timeout] to allow Drupal flows correctly and the necessary adjustement
Now that i need to install couple of Extensions, it loads for quite some times and return me this message on page load, failing to install the extension : Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it.
What could be the solution to this?

AJAX not updating the view after sent

Hello,

I'm working on a custom theme without much knowledge of Drupal. We're working mostly on Wordpress and we had to move to Drupal for this project.

We are using the Poll module that does the job except that when we send the result or try to see the results, it does not change the view or reload the page, the only modification is the "Loading message" that is added on the right of the input and then nothing.

We would like to know if we maybe deleted some region or block that was needed, some wrapper that should be available for the AJAX to work.

Thanks.

D8 and 304 Responses / Revalidation

Hi. We have a Drupal 8 site, using nginx and Adv/Agg with typical settings.

Our server never returns 304 response codes to requests for html documents, even if the etag is unchanged. It always returns a 200 response.

The server will return 304s for image files, css, js, pdf etc. But never for html requests.

Can someone tell us whether this is expected behavior? 

If it is expected behavior - why? Isn't the purpose of the etags to support revalidation?

If it is not expected behavior, any suggestions for troubleshooting would be appreciated.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x