Categories
CMS Development Drupal

Proper integration of Paragraphs in Solr Index

I have a taxonomy entity “Politician” which has a Paragraph field “Party membership”, which consists of a Date Range field for the membership and an entity reference to the taxonomy entity for the party. I have then created a Solr index dedicated to the metadata – it indexes the politician’s entity ID, the politician’s name […]

Categories
CMS Development JSON Wordpress

Issue with json decode in WordPress – value is not returning consistently

I have a json file I am displaying the contents of on my wordpress site. The issue stems from the fact that some of the values I’m returning I need to sort through later, and while that value is being echoed as text, an apostrophe is being displayed as an apostrophe, however if I am […]

Categories
CMS Development Drupal

How can I redirect a user after login to the current page?

I have a Drupal 8 site. And I have approximately 5 pages in a site. For example if a user hits login from the contact-us page the user should not redirect anywhere, they should stay on same page. How can I accomplish this?

Categories
CMS Development

Copy of Craft instance generates “An unknown error occurred” for login

I needed to create a second instance of a craft 2.0 instance and so I copied the current instance to a new instance. I followed the directions found here: https://craftcms.com/guides/duplicating-a-craft-site The structure is like this: /var/www/html/my_site (original – contains the craft and public folders) copied to: /var/www/html/new_folder/my_site (this contains the craft and public folders) There […]

Categories
CMS Development Wordpress

wp cli > wp post delete > will this command also delete metadata associated with posts?

say this: wp post delete –force $(wp post list –post_type=product –format=ids) I found out that it’s far more fast and performant than deleting posts from admin. But I was wandering: any differences between the cli and admin ways? For example, will that cli command also delete metadata associated with deleted posts?

Categories
CMS Development Wordpress

problem when enter data to woocommerce attributes

i want to enter data to attributes value in woocommerce but when enter the value in (persian) language this error show for me: Persian: واژه نمیتواند به بانک اطلاعاتی اضافه شود. English: The word cannot be added to the database. What can I do to solve this problem ?

Categories
CMS Development Wordpress

add_action profile_update never triggered

I’m trying to launch a function when I update a user profile from the backend. (The same function works very well in user_register hook). As it was not working, I created a really simple function like this : add_action( ‘profile_update ‘, ‘my_test_function’ ); function my_test_function( $user_id ) { wp_die(); } But nothing happens. I click […]

Categories
CMS Development Wordpress

Querying posts that don’t have a certain key value or don’t have the key

The intention is to search for customers who do not have coupon X or do not have any coupon. $query = array ( ‘post_type’ => ‘clients’, ‘meta_query’=> array( ‘relation’ => ‘OR’, array( ‘key’ => ‘cupom’, ‘value’ => $idCupom, ‘compare’ => ‘!=’, ), array( ‘key’ => ‘cupom’, ‘compare’ => ‘NOT EXISTS’, ‘value’ => ”, )), ‘posts_per_page’ […]

Categories
CMS Development Drupal

Drupal 8 fillpdf pdftk error upload pdf file

i tried to upload pdf file with drupal 8 and pdftk module, i have this error : Your PDF could not be uploaded. Did you select one? In local everything is ok, can someone help me ? Thanks in advance

Categories
CMS Development Drupal

Content in a custom route

I’m starting to work more with routes in some custom modules. I generally understand how it all comes together but I can’t figure out how one would go about building a page and adding some content to a module-defined route. For instance, if one of my routes is the landing page for after a form […]