Skip to main content
oknate's user avatar
oknate's user avatar
oknate's user avatar
oknate
  • Member for 9 years, 3 months
  • Last seen more than 2 years ago
  • New York, NY, United States
19 votes
5 answers
27k views

How do I get the node type label from a node object?

15 votes
2 answers
21k views

How to test if current page is an admin page?

18 votes
5 answers
19k views

What is the correct way to set cache contexts on custom blocks?

8 votes
6 answers
9k views

Is there a way to clone a content type and its fields?

12 votes
2 answers
6k views

How can I debug entity queries?

11 votes
3 answers
6k views

What is the appropriate way to get items from an entityqueue?

6 votes
2 answers
6k views

How do you clear cache on a block when node of certain bundle added or updated?

0 votes
1 answer
5k views

How to catch twig errors and display custom 500 error page?

8 votes
3 answers
4k views

Custom 500 Error page: Is there a way to theme a fatal error?

6 votes
1 answer
4k views

What is the right way to get number of items from a field?

2 votes
1 answer
3k views

How to add a custom field to apache solr?

4 votes
1 answer
3k views

How to load node object in node preview page?

8 votes
2 answers
3k views

How to mock a node field value for phpunit?

6 votes
2 answers
3k views

How to alter node url or toUrl function output?

0 votes
1 answer
3k views

How to add google_tag script to header with custom environment variables?

4 votes
1 answer
2k views

Unexpected error during import . . . plugin does not exist error on drush config import

3 votes
1 answer
2k views

how do I add contextual edit links in block template for a block entity?

10 votes
1 answer
2k views

Returning alternate HTTP codes for unpublished node

4 votes
1 answer
2k views

Is it a security issue to put CSRF token in drupal settings?

2 votes
1 answer
2k views

How to display a field twice in a view mode?

3 votes
1 answer
2k views

How to prevent duplicate entity reference items from being entered on a field?

1 vote
2 answers
2k views

How do I get a list of all taxonomy terms assigned to a node (or any entity)?

0 votes
2 answers
2k views

How do I prevent anonymous sessions?

3 votes
1 answer
1k views

How to order by a column with NULL values in it due to leftJoin?

3 votes
2 answers
1k views

How to cache block for logged in user?

5 votes
1 answer
1k views

How do I programmatically find the core version?

0 votes
2 answers
1k views

How can I auto-populate fields with Ajax?

2 votes
2 answers
1k views

How to check if search_index's solr is running?

2 votes
2 answers
853 views

How to prevent users (except for admin / editors) from viewing canonical page for content type?

1 vote
2 answers
809 views

How to cache custom controller markup for logged-in users?