Categories
CMS Mastering Development Wordpress

Multiple Select on Gutenberg Sidebar as metakey

I want to show a multiple select element in the sidebar when editing a page in admin, where I can save the selected values in a metakey. Of course also load the selected values upon load of page-edit in admin. I manage to show the list, but I don’t know how to save it i […]

Categories
CMS Mastering Development Wordpress

Pagination Not Working for Custom Taxonomy with Custom Query – 404 Error

I am having trouble getting pagination working for custom taxonomy archive with the custom query. The pagination on the taxonomy archive ends up with a 404 page. I have to run a query multiple times on many areas, so I have created a method for that. Query Method /** * @param bool $post_type * @param […]

Categories
Mastering Development

Jenkins can not add and delete element from JSON form

I’m using the extended choice parameter with Groovy script and JSON scheme to create a “friendlier” UI. For example, I have created this simple groovy script (similar to the documented example here). The groovy script was written as follows: import org.boon.Boon; def jsonEditorOptions = Boon.fromJson(/{ “disable_edit_json”: true, “disable_properties”: true, “no_additional_properties”: true, “disable_collapse”: true, “disable_array_add”: false, […]

Categories
Mastering Development

How to send data in a JSON format to an HTTP End Point from a custom web page?

I have created a simple custom web page using HTML and JavaScript, that allows a user to select multiple languages of their choice to translate text. For example, lets say the user chooses English(en-US) and French(fr-FR) and clicks on “Submit”. I want to take the user’s request, and send that data to an Azure Logic […]

Categories
Mastering Development

JSON schema validation of conditional array objects

I have two type of datasets, with csv or fixed length data. In csv data the fieldlist is just a list of names, while in fixed length data each field is specified by fieldName and fieldLength. I need a json schema to validate both cases, but after trying several solutions, including these, I am not […]

Categories
CMS Mastering Development Wordpress

get upstrap pagination to work with custom query

I am using the excellent understrap WordPress boiler plate theme. It has a pagination function that works if you put inside a standard loop like so: <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <?php endwhile; ?> <?php else : ?> <?php endif; ?> <?php understrap_pagination(); ?> <?php […]

Categories
Development

PySpark sql write dataFrame that has a json column to mysql JDBC

I am trying to bulk write a DataFrame to mysql JDBC database. I am using databricks/pyspark.sql to write the DataFrames to the table. This table has a column that accepts json data(binary data). I did transform the json object to a StructType with following structure: json object structure and conversion to dataframe: schema_dict = {‘fields’: […]

Categories
Development

How to get property value of JSON Tree Schema using JavaScript?

I have a JSON Tree structure like this. [ { “title”: “Blogs”, “id”: “blogs”, “type”: “array”, “children”: [ { “title”: “Today”, “id”: “today”, “type”: “string” }, { “title”: “Yesterday”, “id”: “yesterday”, “type”: “enum”, “options”: [ “Y1”, “Y2” ] } ] }, { “title”: “Links”, “id”: “links”, “type”: “object”, “children”: [ { “title”: “Oracle”, “id”: “oracle”, […]

Categories
CMS Development Wordpress

Problem with pagination link (error 404)

I have a problem with wordpress patination. The limit of posts (custom type post “properties”) per page is 9. When I pusblish 11 properties the pagination links works properly. 9 properties in the first page, and 2 in the second page. But, if I publish 10 properties, the link to second page doest work. It […]

Categories
Development JSON XML

Convert JSON to XML in Logic Apps

I have parsed a JSON string in Logic Apps using the parse json connector. How do I put the output from that step into an xml file? One suggestion I’ve seen is to use “when a http request is received”, but this is a trigger and I need an action. On user voice there is […]