Categories
CMS Drupal Mastering Development

Custom tokens breaking on upgrade to Drupal 9

I’m getting a crash on node save when my node contains a custom token. I’m using the Token Filter module to display tokens in node content. To make the tokens I followed this tutorial, which is similar to the Token documentation. Now, with Drupal 8.8, when I save a new node that contains one of […]

Categories
CMS Joomla Mastering Development

How to set article options and associations programmatically?

I work on a custom Joomla 3 module that creates articles programmatically based on user input. I can create the articles, but I could not find a way to set the article options and associations when the article is created. I found this article on where the options are stored in the Joomla DB, but […]

Categories
Mastering Development

Branch.io initSession returns empty BranchUniversalObject JSON and BranchLinkProperties JSON

I’m trying to add a sharing feature to my existing app using Unity Branch SDK. I created the short URL using the following code. BranchUniversalObject universalObject = new BranchUniversalObject(); BranchLinkProperties linkProperties = new BranchLinkProperties(); string deviceUniqueIdentifier = SystemInfo.deviceUniqueIdentifier; universalObject.canonicalIdentifier = $”xLeague/{deviceUniqueIdentifier}”; universalObject.canonicalUrl = “http://xleague.games/”; universalObject.title = MetaDataManager.Title; universalObject.contentDescription = MetaDataManager.Description; universalObject.imageUrl = MetaDataManager.Image; linkProperties.controlParams.Add(“$desktop_url”, “http://xleague.games/xleague-solitaire-share/”); […]

Categories
Mastering Development

Context hook interfares with React Navigation routing

My React Native (0.61.5)/React 16.9.0 app has nested 3 layer react navigation (5.x) routing structure like below: App.js (NavigationContainter/StackNavigator) SplashScreen.js AppScreen.js (TabNavigator) EventStackScreen.js (StackNavigator) Event.js (screen) Chat.js (screen) Newevent.js (screen) Editevent.js (screen) GroupStackScreen.js (StackNavigator) Group.js (screen) Newgroup.js (screen) ContactStackScreen.js (StackNavigator) Contact.js (screen) Newcontact.js (screen) *The file extension indicates that it is a single file. The […]

Categories
Development System & Network

Postfix: User with aliases has a mailbox, with filename where all aliases are listed

I have a postfix server running on my CentOS 7 machine. I managed to configure the postfix server to use my LDAP server to retrieve accounts and it works fine, emails are received and saved to a mailbox file. I use Dovecot as an IMAP server. They work together nicely for all users, except for […]

Categories
Development

How do I accept passed props and display them in a dropdown and store them in data

I need some guidance and your tips would be greatly appreciated.. I have passed props like this so I accepted them in my EditCriminal.vue props : [‘crimes’,’criminal’,’admins’,’countries’], So what I want is to put those crimes or type of crimes there in the dropdown array and while selecting the specific crime_id and display the criminal […]

Categories
Development

Convert dynamic XML file to pandas Dataframe

thanks for your time et your attention. This is the first time I posted in stackoverflow so excuse me if I’m clumsy. Essentially I’m coding in Python, but it is the first time I’m parsing a XML File. I’ve been working on it for a few weeks, but I’m blocked on one point or more. […]

Categories
Development

Django Rest Framework nested relationship

I’m new in using Django, I need your help So, I created a model like this models.py from django.db import models # Create your models here. class Pegawai(models.Model): name = models.CharField(max_length=60) alias = models.CharField(max_length=60) def __str__(self): return self.name class Barang(models.Model): pegawai = models.ForeignKey(Pegawai,on_delete=models.CASCADE,related_name=’barangs’,) nama_barang = models.CharField(max_length=60) harga_barang = models.CharField(max_length=60) def __str__(self): return self.pegawai.name my serializer: […]

Categories
Development

dangerouslySetInnerHTML in react application not working for including Segment.io tags

I am trying to include Segment.io in my react/NextJS app. I am following the convention set by a previous function that sets Google Analytics const segmentWriteKey = ‘xyz’; export default class CustomDocument extends Document { setGoogleTags = () => { return { __html: ` window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag(‘js’, new Date()); gtag(‘config’, […]

Categories
Development

dangerouslySetInnerHTML in react application not working for including Segment.io tags

I am trying to include Segment.io in my react/NextJS app. I am following the convention set by a previous function that sets Google Analytics const segmentWriteKey = ‘xyz’; export default class CustomDocument extends Document { setGoogleTags = () => { return { __html: ` window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag(‘js’, new Date()); gtag(‘config’, […]