How to add Home Page url key for all scopes programmatically using Recurring.php magento 2

i tried to add Home Page url key programmatically using Recurring.php

Normally from Magento Admin backend:

STORES -> GENERAL -> Web -> Default Pages -> Default Web URL:

enter image description here

I tried using

Vendor/Module/Setup/Recurring.php

<?php  namespace Vendor\Module\Setup;  use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\SchemaSetupInterface; use Magento\Framework\App\Config\ScopeConfigInterface;   class Recurring implements InstallSchemaInterface {        const default_web_url  = 'cms';     protected $  _configInterface;          /**      *  @var \Magento\Framework\App\Config\Storage\WriterInterface      */     protected $  configWriter;      /**      *      * @param \Magento\Framework\App\Config\Storage\WriterInterface $  configWriter      */     public function __construct(         \Magento\Framework\App\Config\Storage\WriterInterface $  configWriter     ) {          $  this->configWriter = $  configWriter;       }      public function install(SchemaSetupInterface $  setup, ModuleContextInterface $  context)     {        $  value = self::default_web_url;        $  this->configWriter->save('web/default/front',  $  value, $  scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $  scopeId = 0);      } } 

In my local this value is storing for all store view scopes($ scopeId = 0) but in our server it’s setting value for only one store view.

This is the issue i am facing here if anyone having any idea please guide me.

Thanks in Advance !!!!.

Should product scopes and/or project scopes be considered for small internal development work

tl;dr: I work at a small company with a development team of 5-10 people, lately we have been asked to present “scope documents” for effectively all of our work before we carry out the actual work, with seemingly no regard given for the magnitude of work required.

I worry that I am often spending more time writing scope documents about small enhancements than I am actually performing the enhancement.


Before I explain my question better, let me establish a few baseline viewpoints on the situation.

I understand creating these documents can be considered training exercises for when the team grows larger and the current members take on lead roles. I am not against this and I think it’s a valuable training experience. I just feel that the documents aren’t always necessary which may lead to wasted time, being a small company it feels we are already pressed for time and resources.

I understand a product and/or project scope is absolutely necessary when beginning an endeavor on an entirely new product, I can also recognize the importance of the documents in maintaining order in a structured and distributed development team (many team members + project leader). And of course scopes are absolutely mandatory when dealing with 3rd party customers wishing to contract our development work.

I understand the need to ensure that a developer fully understands the request before engaging in work, however I am left asking myself whether or not these small enhancements, even if misunderstood, could end up taking more time than it takes to write, review, revise, and signoff the respective scope documents.


With the above understanding in mind, excuse the length of this post, but to describe my issues:

My questions come about in situations where our development team is applying relatively small enhancements to our own internal software. Small enhancements such as adding a single new button to a web UI that performs a simple operation, or adding a new action handler (basically 1 function) to a backend system.

These small enhancements may indirectly bring in revenue as they increase the value of our product, but we aren’t directly selling these new enhancements independently. This leaves little room for any sort of scope regarding cost vs return.

All that is left is a scope detailing the expected outcome, why we’re doing it, and the expected hourly work breakdown (which is often hugely over-estimated). These documents will sometimes go back and forth with discussion over small issues which could often have been applied to the enhancement after it was completed anyway, revisions will be made to the documents to reflect the decisions made in this process.

I can’t help but feel like we are wasting a lot of valuable developer time writing these documents, where the minor enhancement could go through a first iteration of development in the same amount of time it takes to write the initial document. Then the time spent reviewing the document could instead be spent reviewing the code, and instead of revising the document time could be spent revising and finalizing the code — the end result in this situation (to me) is a enhancement which took almost exactly as long as the scope/documentation phase would have taken.

My main questions being: (In the context of a small development team)

Are we taking the right approach to scoping/planning and developing?

Is there any rules of thumb that we should be following with regards to these processes?

Is there any red flags in anything above which indicates I should be looking to adjust my viewpoint on the situation?

Is there any way I can improve the situation while keeping everybody happy?

All insight would be greatly appreciated.

Accessing i18n objects from different scopes

I have been building a personal framework of mine which started off as a way to learn the MVC pattern and has progressed now into something that I like more than most frameworks out there (which is probably because I add what I like and change what I don’t like but nevertheless) and for good or bad I use it in some projects.

The problem I have now is that I can’t come up with a decent way to access my i18n functionality (it’s not really i18n it’s just translations, doesn’t include full i18n support, at least not yet).

The way it works is I use configuration files as language files because I figured it would be pretty convenient to use the Config class to load them since in my framework config files are loaded dynamically – not loaded unless needed, you can grab a glance here

class Config {      private static $  settings = array();      private function __construct() {      }      public static function load($  file) {         $  path = PROJECT_PATH . '/config/' . $  file . '.php';         if (is_file($  path)) {             $  settings = require($  path);         } else {             throw new Exception('Configuration file [' . $  file . '] doesn\'t exist', 500);         }          self::$  settings[$  file] = $  settings;         return true;     }      public static function get($  file = null) {         if ($  file === null) {             return self::$  settings;         } elseif (isset(self::$  settings[$  file]) || self::load($  file)) {             return self::$  settings[$  file];         }     } } 

Where a single configuration file would look something like this

<?php return array(     'setting0' => 'value',     'setting1' => 'value',     .... ); 

That allows PHP to cache those files and loading them becomes very fast.

Now on to translations, as I said they are configuration files in a different directory named lang, but I can’t just go around calling Config::get('lang/en/myLangFile') every time I need to access a translation, so I invented (invented, huh) the Translations class, that represents a single translations file

class Translations {      protected $  data = [];      public function __construct(array $  translations) {         $  this->data = $  translations;     }      public function __get($  name) {         return isset($  this->data[$  name]) ? $  this->data[$  name] : $  name;     }  } 

Now it is super convenient and beautiful to access translations

$  t = new Translations([...]);  echo $  t->translationKey; 

I have a Lang class that is used to set up the user’s preferred language among other little things so I figured I would use that as a factory for my Translations classes

class Lang {      public static function get($  file) {         return new Translations(Config::get('lang/' . self::$  lang . '/' . $  file));     }  } 

So now all I have to do in order to grab some translations is

$  t = Lang::get('myLangFile');  echo $  t->translationKey; 

In case you are wondering why I have so much static stuff it is because these classes make no sense to be instantiated and I don’t like the singleton design pattern, I prefer to have “static classes” even though they are not supported in PHP (yet?).

So far so good, I have got the translations going, but lets get to the problem (finally).

When a view is rendered it is most likely going to print some text out to the user and for that I need to have a translations object available inside but it is pretty inconvenient to have to pass that from the controller because I would have to go and put that on each method and that would be hell, furthermore if I do that then some other controller calls the same view without the correct translations objects stuff is going to break, which makes sense but adds complexity to the program.

What I have been doing up until this point is on the top of every view I construct my translations object

<?php $  t = Lang::get('myLangFile') ?>  <div><?= $  t->helloWorld ?></div> 

This works and guarantees me my views will work regardless of who’s calling them and basically costs nearly nothing in terms of performance because instantiating a Translations will not copy the array containing the information unless a change is introduced since the code in the constructor is just an assignment, so I guess there’s no problem with that but it’s just bugging me for some reason that it is not the correct thing to do.

Furthermore I will need to use a Translations class in a model or validator occasionally and I would need to instantiate it there too, so in a single execution I may be instantiating the same Translations object multiple times. To solve this problem I would need to start putting those objects into the registry and I think this would be getting too far.

I would like to see what are some thoughts on this approach as I could be blinded by my own such and possibly get some useful advice and stuff. Thanks in advance to anyone who chose to spare their time with my problem!

WSO2 APIM: How to Map JWT claims from IDP to APIM user store for roles and scopes

Planning to use WSO2 APIM for lifecycle management. I have integrated our own IDP. JWT claim which we are getting from IDP does not have any information about user role and scopes. All user information about roles were stored in APIM user store.

For JWT grant type, i want to enable RBAC using OAuth2 scopes. I want to map JWT custom claim from IDP to APIM user store claims to fetch user roles and return valid scopes based on roles.

e.g If we i use password grant type, APIM does username look up in user store and fetch the user roles and return scopes which user roles is part of.

Instead of password grant type, i want to use JWT grant type.

What are the source and scopes for Improving Website ranking and traffic.

I have plenty of website of my own. But all have become stagnant.

Can you help me for improve its ranking and generate more traffic to the website? The website is of Insurance related.

Website: – www.monthtomonthcarsinsurance.com

Targeted region: – USA

Website about: – Car/Auto Insurance.

I am targeting to the keywords which are having every low competition and high search volume.

Currently I am ranking one for some of the high search volume Keywords for MonthtomonthCarsInsurance.com…

What are the source and scopes for Improving Website ranking and traffic.

Amazon Affilate site for Binoculars and scopes

Why are you selling this site?
Just don't have time to make it be all that it can (*its been on my hosting for a while now, just other bigger projects I am needed on). Sorta bummed to see it go.

How is it monetized?
Amazon Affiliate, however you can sell products on it as well if you like or install Add sense. The site is solid.

Does this site come with any social media accounts?
No.

How much time does this site take to run?
Do some basic SEO and Link Building…

Amazon Affilate site for Binoculars and scopes

Remove Workflow Manager scopes?

Is there any way to remove additional scope that get’s created when you create a connection to multiple SharePoint Farms from a Workflow Manager service server?

Register-SPWorkflowService -SPSite https://farmb.corp.local  -WorkflowHostUri https://wffarm.corp.local:12290 -ScopeName FarmB 

I found and tried Remove-WFScope but the scopes remain even after. IIS-resets/server reboots make’s no difference.