How to access Sharepoint REST API from backend?

We are trying to access Sharepoint REST API from our backend server without user consent. We registered an app in Azure app registration portal by referring this(Get access without a user) and assigned all permission of Sharepoint instead of Microsoft Graph. We are getting the bearer token but when using the token to request Sharepoint API we are getting sharepoint api invalid issuer or signature in response.

Is there something we are missing? Need advice.

How to fix “no backend found for spell checking” in Kate editor settings?

I have installed Kate editor into my Ubuntu MATE 16.04.6 LTS system as simple as sudo apt-get install kate.

In its Settings → Configure Kate, Editor Component, Editing, Spellcheck tab I see that it does not detect back-end for spell-checking:

No backend found for spell checking Configure - Kate

$   kate Sonnet: No speller backends available! No language dictionaries for the language: "en" 

I have the following packages installed related to spell-check:

$   dpkg -l | grep -iE "dict|spell.*(check|correct)" ii  anthy                                                       9100h-25ubuntu1                                 amd64        input method for Japanese - backend, dictionary and utility ii  anthy-common                                                9100h-25ubuntu1                                 all          input method for Japanese - common files and dictionary ii  aspell                                                      0.60.7~20110707-3build1                         amd64        GNU Aspell spell-checker ii  aspell-en                                                   7.1-0-1.1                                       all          English dictionary for GNU Aspell ii  dictionaries-common                                         1.26.3                                          all          spelling dictionaries - common utilities ii  enchant                                                     1.6.0-10.1build2                                amd64        Wrapper for various spell checker engines (binary programs) ii  geany-plugin-spellcheck                                     1.27+dfsg-2                                     amd64        spellcheck plugin for Geany ii  hunspell-en-ca                                              1:5.1.0-1ubuntu2.2                              all          English (Canada) dictionary for hunspell ii  hunspell-en-gb                                              1:5.1.0-1ubuntu2.2                              all          English (GB) dictionary for hunspell ii  hunspell-en-us                                              20070829-6ubuntu3                               all          English_american dictionary for hunspell ii  hunspell-en-za                                              1:5.1.0-1ubuntu2.2                              all          English (South Africa) dictionary for hunspell ii  hunspell-ru                                                 20120501-1                                      all          Russian dictionary for hunspell ii  iamerican                                                   3.4.00-5                                        all          American English dictionary for ispell (standard version) ii  ienglish-common                                             3.4.00-5                                        all          Common files for British and American ispell dictionaries ii  ispell                                                      3.4.00-5                                        amd64        International Ispell (an interactive spelling corrector) ii  libaspell15:amd64                                           0.60.7~20110707-3build1                         amd64        GNU Aspell spell-checker runtime library ii  libenchant1c2a:amd64                                        1.6.0-10.1build2                                amd64        Wrapper library for various spell checker engines (runtime libs) ii  libgdict-common                                             3.18.0-2                                        all          GNOME Dictionary base library - common files ii  libgtkspell0                                                2.0.16-1.1ubuntu1                               amd64        a spell-checking addon for GTK's TextView widget ii  libgtkspell3-3-0:amd64                                      3.0.7-2                                         amd64        spell-checking addon for GTK+'s TextView widget ii  libhunspell-1.3-0:amd64                                     1.3.3-4ubuntu1                                  amd64        spell checker and morphological analyzer (shared library) ii  libhunspell-dev:amd64                                       1.3.3-4ubuntu1                                  amd64        spell checker and morphological analyzer (development) ii  libjazzy-java                                               0.5.2-1                                         all          spell checker java library ii  libkf5sonnet5-data                                          5.18.0-0ubuntu1                                 all          spell checking library for Qt ii  libkf5sonnetcore5:amd64                                     5.18.0-0ubuntu1                                 amd64        spell checking library for Qt ii  libkf5sonnetui5:amd64                                       5.18.0-0ubuntu1                                 amd64        spell checking library for Qt ii  libmatedict6                                                1.12.0-1                                        amd64        MATE desktop utilities (matedict library) ii  link-grammar-dictionaries-en                                4.7.4-3                                         all          Carnegie Mellon University's link grammar parser (English dictionary) ii  myspell-en-au                                               2.1-5.4                                         all          English_australian dictionary for myspell ii  myspell-en-gb                                               1:5.1.0-1ubuntu2.2                              all          English (GB) dictionary for hunspell - dummy transitional package ii  myspell-en-za                                               1:5.1.0-1ubuntu2.2                              all          English (ZA) dictionary for hunspell - dummy transitional package rc  myspell-ru                                                  0.99g5-20                                       all          Russian dictionary for MySpell ii  python-enchant                                              1.6.6-2                                         all          spellchecking library for Python ii  python3-enchant                                             1.6.6-2                                         all          spellchecking library for Python 3 ii  wamerican                                                   7.1-1                                           all          American English dictionary words for /usr/share/dict ii  wbritish                                                    7.1-1                                           all          British English dictionary words for /usr/share/dict   

How should I fix this?

Development workflow for a react app and a backend

We are trying to figure out the right workflow for React app development. Our SPA connects to backend API and I’m not sure where to host the backend server. This is for two reasons:

  1. I want my local dev react app to stay fully functional (connected to backend API)

  2. I want to have a full version of the app (front and back) available for review and manual testing after each git push.

The philosophy and tools we are looking at are GitLab CI/CD and Reviews App.

As I understand it, the workflow for a single repository should go as follow:

  1. A developer creates a branch
  2. A developer pushes changes
  3. GitLab CI performs automated build and tests
  4. GitLab Review Apps makes an app available for review
  5. Merge
  6. Deploy to production (we don’t have prod version yet)

Now how to adjust this for a typical case when there are frontend and backend in separated repos? To which stage of the backend development cycle should we connect the local version (on a developer’s laptop) of a react app? Perhaps Review Apps? Should we keep our backend app up and running on Review Apps environment and connect to it from local react app? This generates some problem with domain imparity but this can be easily resolved I think.

Back-end: Saving settings

I have an admin panel which can set a lot of options which will affect some other services drastically. I got that for example if I create a different category I can just insert it in Category table and then front-end will be able to get it but I’m almost totally lost with what do I do with simple flags, how do I save them

I will show few examples:

  1. “2FA required” – which affect the other service and force every user to set 2fa on registration
  2. “Manual transactions” – any user deposit and withdrawal transaction both will require manual admin\moderator check via admin panel

I could give more examples but I think it’s enough. These are basically flags which state I need to save some way and access on end-points but I feel like saving flags in the database without relationships with other tables is not completely right approach

Front-end and Back-end Communication for a Mobile App

I need a recommendation about the communication protocol between a mobile front-end and cloud back-end.

I am planning to have a Flutter mobile app (for Android and IOS) as front-end. My back-end service will be running on the AppEngine (PaaS) of GCP (Google Cloud Platform). It is similar to Amazon Beanstalk or Azure.

I would like to record or save user actions/information to the FireStore of the GCP. Some actions will be saved through service (a Java app), and some of them can directly be saved from the Flutter mobile app.

My question is: what kind of communication methods can I use for the sending user information (img, txt, ect.) from a mobile app to the service?

I was thinking of using HTTP(S) to communicate with my Java app. Mobile app will simply send all the information from user in POST request body and service will send back the result. Would that make sense? What could be the drawbacks? If thousands of request are generated per second, would it still be okay? Or should I use a messaging system? (JMS ect.) Or is there any other recommendation?

My other question is that should I implement my Java service app multi-threaded or PaaS systems scales automatically (in case of so many requests)?

Simple Architecture

Event when order created from backend

I’ve used sales_order_place_after to get order id after order placed from backend but it doesnt return order id. Not sure what’s missing here.

Here’s my observer

public function execute(\Magento\Framework\Event\Observer $  observer)     {         $  order = $  observer->getOrder();         echo $  orderId = $  order->getId();  exit;     } 

Above code executed but if it doesnt print order id.

Any suggestions for this ? For all those who are curious I need to store order data after order plaed into custom table.

Should I keep my web app front end completely backend agnostic

I am very much an amateur developer. I have written a web app which uses parse-server as a backend.

My question revolves around how agnostic the frontend should be to the backend (parse server)?

For example, on the client side (browser), I query the parse-server for data – let’s say using function GetData(). My web app then renders that data to the user – say, using ShowData(). BUT, GetData() returns an array of Parse Objects – so the client side rendering function requires the data is an array of Parse Objects.

Essentially, my code is locked into using parse-server. If I ever decided to I wanted killer feature ‘X’ that’s only available in, say, Firebase then I can’t move easily.

For me, I have no plans to move backend but wanted to know how this is done in the professional circles?

So, would ShowData() be written in such as way that it requires the data in a generic format (e.g. JSON); and GetData() would ensure that whichever backend is used (parse, firebase, etc) it would always return data in the same format (JSON or whatever)?

Or is the way I have done it perfectly normal?

External API and database calls in Frontend or Backend?

I am working on a startup. During a meeting an investor asked me why am I calling the external APIs and database queries in the frontend with Ajax-Javascript and not in the backend? I couldn’t answer the question. I have not much experience in backend development. Is there anything which I should consider in my frontend development? Performance? Scaling? Any advantages or disadvantages with frontend or backend?

Thank so much.

getIsResizeEnabled() is not working on Magento Backend

On Magento 2.3.2 version isResizeEnabled() is not working properly. It is throwing fetal error in the sadmin panel while i am going to the slider editing page.

<div id="id_nupIqHg2SWgdt9sX90VPMMTLKEwINXoQ_Uploader" class="uploader" data-mage-init="{         'Magento_Backend/js/media-uploader' : {             'maxFileSize';: 33554432,             'maxWidth': 1920,             'maxHeight': 1200,             'isResizeEnabled': <br /> <b>Fatal error</b>:  Uncaught Error: Call to a member function getIsResizeEnabled() on null in /mnt/home/sparkitbd/public_html/demo/outfitbd/vendor/magento/module-backend/view/adminhtml/templates/media/uploader.phtml:18 Stack trace: #0 /mnt/home/sparkitbd/public_html/demo/outfitbd/vendor/magento/framework/View/TemplateEngine/Php.php(59): include() #1 /mnt/home/sparkitbd/public_html/demo/outfitbd/vendor/magento/framework/View/Element/Template.php(271): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Backend\Block\Media\Uploader), " mnt="" home="" spark...',="" array)="" #2="" sparkitbd="" public_html="" demo="" outfitbd="" vendor="" magento="" framework="" view="" element="" template.php(301):="" magento\framework\view\element\template-&gt;fetchview('="" spark...')="" #3="" module-backend="" block="" template.php(129):="" magento\framework\view\element\template-&gt;_tohtml()="" #4="" abstractblock.php(1094):="" magento\backend\bl="" in="" <b="">/mnt/home/sparkitbd/public_html/demo/outfitbd/vendor/magento/module-backend/view/adminhtml/templates/media/uploader.phtml on line <b>18</b><br> </div> 

The code for uploader.phtml is here

<div id="<?= $  block->getHtmlId() ?>" class="uploader"     data-mage-init='{         "Magento_Backend/js/media-uploader" : {             "maxFileSize": <?= /* @escapeNotVerified */ $  block->getFileSizeService()->getMaxFileSize() ?>,             "maxWidth": <?= /* @escapeNotVerified */ $  block->getImageUploadMaxWidth() ?>,             "maxHeight": <?= /* @escapeNotVerified */ $  block->getImageUploadMaxHeight() ?>,             "isResizeEnabled": <?= /* @noEscape */ $  block->getImageUploadConfigData()->getIsResizeEnabled() ?>         }     }' >