Creating an Admin- Official Doc - sonata-admin

I'm trying to learn Sonata and I started to follow the official doc. I created a docker project with symfony 3.4, then I add the admin bundle. There is something that making me crazy from days. I will explain the best I can:
1 step -> Docker with containers
2 step -> skeleton of Symfony 3.4
3 step -> Starting sonata official doc. At the end I should see the admin page but no way, nothing
4 step -> I put everything on git, I delete everything, I clone the project, composer install and the magic, I have the admin page.....Why???:(
5 step -> I continue with doc to create an admin; at the end I should see the page admin with Category, Add new, List but nothing. If I do the same procedure as before (deleting folder, clone the project with my last changes, composer), I can see the new changes in the admin page. So what's wrong?
Could you help me to understand?
Thanks for your help

Related

WordPress CLI installation for ReactPress

sorry for the potentially obvious setup question but I can't seem to find the answer or am searching for the wrong thing.
I'm new to WordPress and I'm attempting to use the plugin ReactPress to add some React to my website. However I'm getting stuck on setup. The ReactPress instructions in WordPress tell me to:
It seems you don't have any React apps created. Go to /path/to/my/workpress in your command line and enter:
But that path/to/my/workpress doesn't exist. I installed WP-CLI so commands like wp info succeed, but I don't have this folder. I must be missing an installation step - any tips?
Thanks!

How do I deploy react app on user pages (Github)?

I am trying to deploy a react app, but specifically on user page on github pages. I can see a LOT of resources for deploying to project page, but nothing yet for user page. Please help!!!
I have tried switching the gh-pages line in the package.json file to include master, but even then I will have to update the gh-pages branch, it doesn't deploy directly from master. I want to be able to deploy directly from master.
gitname/react-gh-pages is one good example, and applies to a user site, where GitHub requires that the repository's name have the following format: {username}.github.io (e.g. gitname.github.io).
But it uses the gh-pages branch as publication source, not master (which no longer exists anyway, since it was renamed to main since Oct. 2020)
The OP cheese-berry references in the comments the post "How do I deploy a simple React app as a "user page" to Github Pages?"
cheese-berry adds:
For anyone else with the same question, you need to basically:
pay attention to your repo name,
install the gh-pages package,
modify your package.json file, and
change your source of deployment on GitHub (Repo -> Settings -> Pages -> Build & Deployment).

ASP.NET Core with React.js fails to run in Azure

Created a new app in VS2022 from tamplate:
Everything runs fine locally and I get the Json payload successfully (fetch-data).
However, when deployed to Azure it does not. It looks as if routing does not work for some reason.
I've tried different suggestions here:
React JS App Routing Issue Only After Deploying to Azure Web App
React routing not working in Azure website
https://social.msdn.microsoft.com/Forums/en-US/836324ff-2893-4eca-828d-0ac47f8fc5bf/azure-web-app-service-react-routing-amp-deploy-problem?forum=windowsazurewebsitespreview
Azure Configuration: Tried nesting wwwroot, that didn't work either:
Error:
Please help
I have followed the steps you provided, and the demo application works well in my side. And I think your app service is normal, the issue should be related to publish file.
Test Environment
Microsoft Visual Studio Enterprise 2022 (64-bit) - Current Version 17.2.4
PM> node -v
v16.15.0
PM> npm -v
8.13.2
I know it works well in your local now, and please follow my suggestion to try 😁.
Troubleshooting Steps:
⚠️Upgrade your visual studio 2022 to the latest version, and also update npm and node.
Please create a new azure app service(.Net6 LTS), you can delete it later. We don't need do any setting in this app.
Create a sample project in VS2022, and test it in local, make sure it works well.
The above steps ensure that the VS environment is up-to-date and the app environment is initial.
Publish this demo project
Check the kusu site. url like: https://app_name.scm.azurewebsites.net
Check the publish files. My demo create by template, have contain 1 wwwroot folder and 9 files.
If you still want to figure out what's wrong with the current app, see the introduction below.
Delete all the settings, make app service is clean. It means you can access the site like your second pic contains loading....
Find the web.config file and change stdoutLogEnabled to true.
Back to the azure portal and enable detailed error messages.
Restart the app and back to kudu site, and remember to refresh kudu site.
Looks like I was using an old template that came with VS2022. I updated my VS version, created a new project from template and noticed this line was added in Startup.cs (in this new template):
endpoints.MapFallbackToFile("index.html");
and also this:
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
Now my app works in Azure as well. Thank you

How can I use Angular 2 with NetBeans?

I have tried every tutorial I could find to try to make a HTML/JS project with Angular 2 working on NetBeans, but none have worked. Maybe is my npm that is bugged (search, for example, doesn't work).
The node_modules folder that is created with npm install is grey on NetBeans and have some errors in some files (I don't know if this is normal). Any .js I try to import from node_modules folder gives the error Failed to load resource: net::ERR_EMPTY_RESPONSE / Uncaught ReferenceError: System is not defined.
Does anyone have any idea what could I be doing wrong? Or does anyone knows any tutorial that have the code to download so I can compare with what I'm doing and see what is the correct? Every tutorial I have found doesn't have any code to download, just some pieces of codes in the page for explanation.
Sory if this isn't a good question, but I have been trying to make this work since yesterday without success and I'm completely out of idea.
First I recommend to upgrade to the last version of NodeJS and NPM, to minimize the errors in your node_modules folder
Install the Everlaw's Typescript plugin from https://github.com/Everlaw/nbts/releases . If you are using Netbeans 8.1 I think you can install it directly from the Plugins installer. I'm using NetBeans 8.2 and there is no problems installing the plugin manually.
Then on NetBeans go to Tools -> Options -> HTML/JS -> Node.js and write the right Node and NPM Paths and Sources, I would recommend check-on the three check-boxes in that panel.
For a quick start try the QuickStart demo from the angular.io page, it is not necessary make any change in the package.json.
The first time I tried to debug an Angular 2 application I put the index.html file directly in the project folder in order to do not make any changes in the index.html script sources nor change the project files structure but you need to change some properties of the project:
In the project window right click the project and select properties.
In sources change the Site Root Folder using the Browse button and select the project folder (You can ignore the warning that appears).
In Run select Run As: Web Application.
I recommend select Browser: Chrome with NetBeans Connector
Using the Browse button go to the project folder and select index.html as your Start File.
Select Web Server: Embedded Lightweight.
And finally in Web Root write /Your_Project_Folder
run npm install from NetBeans
Click the run button and your web application must open in chrome, if you edit your html or typescript files and save them you could see the changes in the browser in real time without re-debuggind your application and can use the Browser DOM window to explore your elements created from Angular 2.
You still see some errors in your files because NetBeans is not fully compatible with the HTML Angularized syntax. But it runs flawlessly.
You can also run the start script directly from Netbeans to run your project using lite-Server.
Screenshot NetBeans - Angular 2
I would recommend you to install the angular cli: npm install -g angular-cli#webpack
Fore more infos regarding this tool, take a look here: https://cli.angular.io/
Then create a new Angular2 app with ng new <app-name>
This will create a complete and working Angular2 application in the current folder.
cd <app-name> and start the app with ng serve.
Check your new created app in your browser on localhost:4200.
If this works, you can try to get started with your NetBeans! :)

GAE Endpoint Library for C# in Xamarin

I currently using Android Studio to built my GAE endpoints and app. However, I want to move to Xamarin, so I can build an iOS version of my app.
My plan is to continue to use Android Studio to build the endpoint client library and "migrate" it to Xamarin.
However, my challenge is finding any useful information to make this work. Can someone advise? Much appreciate it!
Step 1: Install pip if you don't have one sudo easy_install pip
Step 2: Install google client library generator pip install google-apis-client-generator
Step 3 : Hit the url in the browser by replacing the application ID https://{applicationId}.appspot.com/_ah/api/discovery/v1/apis
Step 4 : Copy the the property in the json "discoveryRestUrl" It would look like https://{applicationId}.appspot.com/_ah/api/discovery/v1/apis/{your api name}/v1/rest
Step 5: Download the file from url and save it as rest.json
Step 6: use the below line generate_library --input=rest.json --language=csharp --output_dir={your output location}
Please refer this link might be useful for you.
https://sookocheff.com/post/appengine/cloud-endpoints/generating-a-c-sharp-client/
Also Refere: https://github.com/GoogleCloudPlatform/appengine-endpoints-helloworld-dotnet

Resources