WP MU - if I change a subsite domain, I can't use permalinks other than default - subdomain

I have a WP MU deploy. I'm using many subsites, all with the same base domain and diferent directories:
www.prueba.com/ar (for Argentina)
www.prueba.com/uy (for Uruguay)
www.prueba.com/cl (for Chile)
I want to set up a diferent subdomain for Brazil as:
www.prova.com (for Brazil)
Since Brazil's language is Portuguese and Spanish "prueba" = Portuguese "prova"
It's working, the only problem is it doesn't work with the permalink configuration called Post name "http://www.prueba.com/ar/sample-post/" (more friendly) BUT only with the Default configuration "http://www.prova.com//?p=123"
I can't figure out how to make it work with the special Portuguese domain AND post name permalinks.
Any advice?
Thanks guys,
Sandra Vega

You can try this Domain Mapping plugin for Wordpress. I have never used it but looks like a solution for your problem.

I had to use "http://www.prova.com/br" and then it worked. Not the prettiest solution but acceptable

Related

WSO2 IS 5.10.0 - Add new language in User Portal Overview

When I log in "user-portal" of WSO2 Identity Server (the url is "https://localhost:9443/user-portal/overview"), I can see four options to change the language (english, portuguese, sinhalese or tamil).
I need to add more options in this section. How can I do this? I can't see a "Resource.properties" inside the folder "/repository/deployment/server/webapps/user-portal" to do something like in the following link https://is.docs.wso2.com/en/latest/develop/localization-support-in-identity-server/#localization-support-in-identity-server.
Thanks in advance.
Gonzalo.
WSO2IS UserPortal is a React-based application and in there what is done is to combine all the configurations in i118 to react config mappings if you want to change anything you need to do it at the code level.
https://github.com/wso2/identity-apps/blob/v1.0.72/apps/user-portal/src/configs/i18n.ts
you can map all the configs to your preferred language and map them to the configurations used in UserPortal by building the package.

TYPO3 name of language file?

So I'm currently working myself through the following introduction about extension developement for TYPO3:
https://docs.typo3.org/m/typo3/book-extbasefluid/9.5/en-us/4-FirstExtension/4-make-products-persistent.html
There it says
TYPO3 is able to group all records of an extension in the new record wizard. To define the name of this group, create a language file in the directory EXT:store_inventory/Resources/Private/Language/ and add the key extension.title.
What do I therefore have to name the language file (you might also want to check the link) for it to work and what exactly is meant by "add the key extension.title"?
Filenames of language files are created with several patterns
typo3conf/ext/extkey/Resources/Private/Language/locallang_db.xlf
Is used in Backend i.e. for displaying the name of the tables, names of fields in the backend edit form, plugins etc. Naming convention here is rather strict. i.e.:
<trans-unit id="tx_extkey_domain_model_yourmodel.name">
<source>Name</source>
</trans-unit>
can be used in the TCA of your model like:
'name' => [
'exclude' => true,
'label' => 'LLL:EXT:extkey/Resources/Private/Language/locallang_db.xlf:tx_extkey_domain_model_yourmodel.name',
'config' => [...],
],
typo3conf/ext/extkey/Resources/Private/Language/locallang.xlf
Is used in FrontEnd, so for an instance
<trans-unit id="my_list_header">
<source>This is list of my elephants</source>
</trans-unit>
can be accessed within your Fluid template like
<h1><f:translate key="my_list_header"/></h1>
Note: as you can see naming convention for id/key, in this case, is more flexible, then in case of *_db.xlf files.
typo3conf/ext/extkey/Resources/Private/Language/locallang_csh_tx_extkey_domain_model_yourmodel.xlf
Is for adding CSH - Content Sensitive Help
<trans-unit id="name.description">
<source>That's just the record's name Sherlock!</source>
</trans-unit>
In Backend looks like:
You can also add [fieldname].details node to XLIFF file and then it will allow displaying more detailed help for the field in the popup window.
<trans-unit id="name.details" xml:space="preserve">
<source>Sherlock Holmes (/ˈʃɜːrlɒk ˈhoʊmz/ or /-ˈhoʊlmz/) is a fictional private detective created by British author Sir Arthur Conan Doyle.</source>
</trans-unit>
TIP
Although learning of creating TYPO3 extensions from the scratch is quite romantic I'd suggest starting from installing extension_builder extension and creating own extension's skeleton within minutes or even seconds. It will create most of the required elements, like SQL insertion, language files, TCA and TypoScript configuration files and many more, so you can investigate it against tutorial easier.
About the key
I may be wrong, just don't remember now, probably extention.title was some approach in a pre-Extbase way, years ago. Nowadays I didn't meet it in any extension which works with ver 9.x or 10.x. It's obviously missing part in documentation you mentioned in yor question and it should be rather fixed there, to be more detailed.
I would have thought that your file should be extention.title

how to delete all urls in database

I previously used an old CMS.
I moved to wordpress and I've done a lot of work, but I still have in my very old articles 1000+ internal links pointing to old urls.
I've set up redirects, but I would like to actually replace / delete the very old internal linking in the wordpress database.
I have 3 types of old linking :
/articles.php?lng=fr&pg=425 .......... so like /articles.php?stuff
/news.php?lng=fr&pg=1827 .......... so like /news.php?stuff
/2456-actualite .......... so like /id-actualite
I believe that "Search and replace" and "Better search and replace", both Wordpress plugins are only dealing with exact urls, while the ids are dynamic.
How would you delete those all links in the database, but keeping the hypertext of those links?
Thanks !
Have you tried using WP Cli?
It's a very powerful tool for this kind of problems by running some commands on your server.
Example:
# Search and replace but skip one column
$ wp search-replace 'http://example.dev' 'http://example.com' --skip-columns=guid
Have a look more on their search-replace command.
It is probably impossible to change each URL by hand.. much better way is to use something like this "https://wordpress.org/plugins/search-and-replace/" to replace all URLs you need in the database. - This does not only deal with urls but with any other text too.

Personal wiki: changing the names of several pages

In my wiki I sent in a request to add a new namespace called 'Exchange', however adding the new namespace will delete all pages with the name 'Exchange:blahblah'. So I would need to change the page name for all these pages before requesting to add the namespace. The problem is that there are just under 1000 pages such as 'Exchange:blahblah' and changing the names of all of them would take up too much time.
My question is how, if possible, can I change the names of all these pages without having to manually alter the name individually. That is, if I wanted to change every exchange page from 'Exchange:blahblah' to 'Exchange1:blahblah', then is there a quick and easy way to change them all. All the pages are under the same category, if that helps.
Any advice would be greatly appreciated.
Add the namespace then run php maintenance/namespaceDupes.php --fix --move-talk from shell. See its documentation for details.

Mediawiki custom namespaces id change

I am currently working on an internal Mediawiki and we are using a lot of custom written extensions.
Because we did no know better, defined custom namespaces for our own extensions and articles with an id that is smaller than 3000.
For example:
define('NS_bla', 1100);
$wgExtraNamespaces[NS_bla] = "bla";
define('NS_bla_TALK', 1101);
$wgExtraNamespaces[NS_bla_TALK] = "bla Talk";
We did this with several different extensions. Now we read on the official documentation (http://www.mediawiki.org/wiki/Extension_default_namespaces) that custom namespaces should use id's that are 3000+.
Therefore my question: How can we easily change the IDs of the namespaces on the production instance, without messing up with our current dataset? How could we tackle this problem? I could not find any information on the Mediawiki documentation.
Thank's a lot in advance and
Cheers from Germany,
Fabian
To answer the question, you would need to update the page table with the new namespace ID:
http://www.mediawiki.org/wiki/Manual:Using_custom_namespaces#Use_a_database_query
To fit this to your occassion, it would be:
UPDATE page
SET page_namespace = 3000
WHERE page_namespace = 1100
You shouldn't have to replace the page_title since these articles are already in another namespace.
Just please remember to back up your database before trying this.