Search This Blog

Friday, April 10, 2020

Joomla 1054 Unknown column 'a.extra_query' in 'field list'

Steps
1. Go to  Extension manager -> Database, and click the Fix button in the upper left corner
2. Now go to System. Control Panel. You can see it is fixed.

Fix Database
Screenshot

.htaccess file gives 500 internal server error

  1. In your root folder
  2. Create .htaccess file in your project root directory like below.

.htaccess

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
  1. Save .htaccess file.

Thursday, April 9, 2020

Added Google Site Verification HTML TAG in old Joomla Templates

Google Console

1. goto search.google.com
2. select right side option, give ur index url
    ex: http://www.infovijay.com
3. go down, select html tag verification.
4. Generate. copy that metatag, apply into your html/php of the main index.
5. Click verify


In your Joomla Template

1. Open filemanager
2. goto public_html/templates/avatar_nine/core/classes folder
3. Open template.php
4. find public function addHead()
{} method and add before return.

sample 

public function addHead() 
{
....
$head .= '< meta name="google-site-verification" content="BTDlLui-sdfdsfdsfdsf4r4454ergdrfgrdfgdfgikORSxw" / >';

return $head;

}

Friday, April 3, 2020

Spring Boot application.yml

Make sure your pom.xml

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.xml</include>
<include>**/*.yml</include>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>


OR

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>


GlobalProperties.java

@Component
@ConfigurationProperties ( "product" )
public class GlobalProperties
{
String url;
          //setter, getter
}


application.yml

product:
      url: "http://url.com"

Wednesday, March 25, 2020

Tuesday, March 24, 2020

Java : Static method to get classes/Resources folder and copy from inside zip to outter



URL url = MethodHandles.lookup().lookupClass().getResource ( "text.json" );
FileUtils.copyURLToFile(url,  new File ( "D:/text.json" ) );

Thursday, March 19, 2020

Sunday, March 15, 2020

Eclipse or CMD Maven Quarkus Debug

[2 steps] #******** #Step 1 mvn -X clean -gs "../settings.xml" compile quarkus:dev -Ddebug
#step 2 #in eclipse, Go to Debug Configuration -> Remote Java Application -> Click new -> New Name "ex: Data Collector Remote" -> Type "socket", host "localhost" port "5005" -> Apply & Debug #Next time #First execute the Data Collector SVN with above command #Second execute the Debug As "Data Collector Remote"






Wednesday, March 11, 2020

Spring Boot - Hibernate column is created with _ underscore, but ma already existing column should take rather than new column

Spring application.yaml

spring:
jpa:
        hibernate:
            naming:
                implicit-strategy: "org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl"
                physical-strategy: "org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl"


Spring application.properties

spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

Tuesday, March 3, 2020

Simple 3rd party HTML Form autologin from your Application

1. simple copy the below script
2. change the login url in javascript
3. change the login authenticate url "when they click login submit" in the FORM action tag
4. change the text name value exactly same as their username,password field name
5. save and double click the HTML.


<html>

<head>

    <title>Crunchify Login Page</title>
    <script>
        function loginForm() {
            document.myform.submit();
            document.myform.action = "https://loginpage.url";
        }


    </script>
    <style type="text/css">
        body {
            background-image: url('https:///plus.medibuddy.in/bg.png');
        }
    </style>
</head>

<body onload="loginForm()">
    <form action="https://login-authenticate-url" name="myform" method="post">
        <input type="text" name="username" value="vijay@vijay.com">
        <input type="password" name="password" value="vijay">
        <input type="submit" value="Login">
    </form>

</body>

</html>

Hit Counter


View My Stats