Giter Site home page Giter Site logo

syliusbetterseoplugin's Introduction

syliusbetterseoplugin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

syliusbetterseoplugin's Issues

Figure out a way to render block in head

Currently we're using javascript to create meta tags in the header, from the body.
The cleanest way would be if we could render the _seo_block directly in the header itself.

This can be done using the sonata block render event sylius.shop.layout.head. The problem is that we can't access the product in this context.

  • Find a way to access product in head context
  • Move _seo_block render to head

Table already exists.

Following installations steps, doctrine:migrations:diff throws this error:

In SchemaException.php line 108:                                                               
The table with name 'sylius.sylius_product' already exists.

I'll add Spanish translation

Let me know (ping me here in GitHub) if you add/remove/modify translation keys in the future, so I can update it.

Behaviour Testing

Behat Testing

We should add some behat tests to cover some basic scenarios.

Examples:

  • If i have a product, then i can set it's seo data and it'll render the tags on the page
  • If i have a taxon, then i can set it's seo data and it'll render the tags on the page
  • if i have a product and i have locale x and y set on the current channel, then i can add seo in x and y
  • if i have a taxon and i have locale x and y set on the current channel, then i can add seo in x and y

These tests should be added against the 1.0.0 branch.

500 error with taxon override

Hi, I install the plugin on my Sylius test website, I read the docs and when I override Taxon I've got a 500 error on my server.

Log of the error :

[2020-12-10T15:17:44.012086+01:00] php.CRITICAL: Error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't1.seo_id' in 'field list' in /mnt/j/Professionel/Developpement/casaya/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115 Stack trace: #0 /mnt/j/Professionel/Developpement/casaya/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute() #1 /mnt/j/Professionel/Developpement/casaya/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1255): Doctrine\DBAL\Driver\PDOStatement->execute() #2 /mnt/j/Professionel/Developpement/casaya/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(750): Doctrine\DBAL\Connection->executeQuery() #3 /mnt/j/Professionel/Developpement/casaya/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(768): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load() #4 /mnt/j/Professionel/Developpement/casaya/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php(159): Doctrine\ORM\Persisters\Entity\Basic {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't1.seo_id' in 'field list' in /mnt/j/Professionel/Developpement/casaya/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115\nStack trace:\n#0 /mnt/j/Professionel/Developpement/casaya/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute()\n#1 /mnt/j/Professionel/Developpement/casaya/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1255): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2 /mnt/j/Professionel/Developpement/casaya/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(750): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /mnt/j/Professionel/Developpement/casaya/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(768): Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister->load()\n#4 /mnt/j/Professionel/Developpement/casaya/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php(159): Doctrine\\ORM\\Persisters\\Entity\\Basic at /mnt/j/Professionel/Developpement/casaya/vendor/sylius/resource-bundle/src/Component/Model/TranslatableTrait.php:53)"} []

IMHO I don't have the seo_id on taxon table, I think something done wrong when I do my doctrine:migrations:migrate but I don't find where the problem.

My Version20201210132508.php after my doctrine:migrations:diff :


declare(strict_types=1);

namespace App\Migrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
 * Auto-generated Migration: Please modify to your needs!
 */
final class Version20201210132508 extends AbstractMigration
{
    public function getDescription() : string
    {
        return '';
    }

    public function up(Schema $schema) : void
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->addSql('ALTER TABLE sylius_product ADD seo_id INT DEFAULT NULL');
        $this->addSql('ALTER TABLE sylius_product ADD CONSTRAINT FK_677B9B7497E3DD86 FOREIGN KEY (seo_id) REFERENCES joppedc_seo (id)');
        $this->addSql('CREATE UNIQUE INDEX UNIQ_677B9B7497E3DD86 ON sylius_product (seo_id)');
    }

    public function down(Schema $schema) : void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('ALTER TABLE sylius_product DROP FOREIGN KEY FK_677B9B7497E3DD86');
        $this->addSql('DROP INDEX UNIQ_677B9B7497E3DD86 ON sylius_product');
        $this->addSql('ALTER TABLE sylius_product DROP seo_id');
    }
}

Is someone can help me please?

Add image

If we add an image to the SEOTranslation, we could use this for both og:image and twitter:image. If there's no image set, we can fallback on the first product image.

doc: Database requirements

There should be some requirements in docs to tell people that they need database that supports JSON type. Noticed this one when fixing TravisCI build process within #12

The error that occurs within database that doesn't support JSON type is shown here

Move entity changes to trait

In order to provide the most flexibility, the changes we made to the product entity should be done using a trait. This way, when a user overrides the Sylius Product model, all they have to do is add the trait to get the required fields.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.