odiseoteam / syliusblogplugin Goto Github PK
View Code? Open in Web Editor NEWThis plugin add blog capabilities to your Sylius project.
License: MIT License
This plugin add blog capabilities to your Sylius project.
License: MIT License
Is there any reason for repositories to be final?
Now I have to extend bundle repository and copy all methods.
Hi,
I'm running on Sylius 1.7 with the last version of your plug-in.
After installed successfully your bundle. I have created a blog categorie which work.
After that, I've created an articles without any pictures. Then I got an 500 error when going on the articles index (admin/blog/articles/).
Logs :
Return value of Odiseo\\BlogBundle\\Model\\Article::getImages() must implement interface Doctrine\\Common\\Collections\\Collection, null returned at C:\\Users\\xxx\\Desktop\\xxx\\xxxx\\website\\vendor\\odiseoteam\\blog-bundle\\src\\Model\\Article.php:159)"} []
I was having this issue with installation of odiseoteam/[email protected]
and visiting /blog/articles
route:
Template reference "SyliusUiBundle:Macro:messages.html.twig" not found, did you mean "@SyliusUi/Macro/messages.html.twig" in @OdiseoSyliusBlogPlugin/Shop/Article/index.html.twig at line 3
It appears to work be updating the template reference as recommended in src/Resources/views/Shop/Article/index.html.twig.
- {% import 'SyliusUiBundle:Macro:messages.html.twig' as messages %}
+ {% import '@SyliusUi/Macro/messages.html.twig' as messages %}
Hello,
I've made an composer intall this morning and since i've this error :
No identifier/primary key specified for Entity "Odiseo\SyliusBlogPlugin\Entity\Article" sub class of "Odiseo\BlogBundle\Model\Article". Every Entity must have an identifier/primary key.
What can i do ? Thank you
Sylius: 1.10.14
odiseoteam/sylius-blog-plugin : v1.3.5
I just found out that the forms use by default the 'odiseo' validation_group instead of the usual 'sylius' group.
Can we inform the users about this validation_group somewhere in the docs?
Thanks.
Hi there,
I would suggest to add provider for the sitemap xml for the articles and categories using the @stefandoorn plugin (https://github.com/stefandoorn/sitemap-plugin).
If u didn't have time, I'll try to create a PR in my free time.
There are 2 minor typos in 2 templates:
views/Shop/Article/_comment.html.twig line 25:
'redurectParameters': {'slug': comment.article.slug }
should be:
'redirectParameters': {'slug': comment.article.slug }
and
views/Shop/Article/show.html.twig line 65:
'redurectParameters': {'slug': article.slug }
should be:
'redirectParameters': {'slug': article.slug }
I will make a pull request over the weekend.
Cheers!
The HTML encoding for article.content in list of articles is not good.
I have this when I use accents in my content of article :
So to fix this we need to change in OdiseoSyliusBlogPlugin/views/Shop/Article/index.html.twig
REMOVE :
<p>{{ article.content|striptags|length > 200 ? article.content|striptags|slice(0, 200) ~ '...' : article.content|striptags }}</p>
ADD :
<p>
{% if article.content|striptags|length > 200 %}
{{ article.content|striptags|slice(0, 200)|raw }}...
{% else %}
{{ article.content|raw }}
{% endif %}
</p>
Hi,
I'm using Sylius 1.7 with your last version of your plug-in.
After created my categorie and my article. I tried to see it on my website (in the shop).
I'm also getting an error 500 on the article page ({_locale}/blog/articles/{code}).
It throw this error because of a non-existing getter : getAuthor() in ArticleComment of your BlogBundle (not the SyliusBlogBundle).
It try to get the author in this form : ArticleUserCommentTypeExtension of your SyliusBlogBundle.
at C:\\Users\\xx\\Desktop\\xx\\xx\\website\\vendor\\twig\\twig\\src\\Loader\\FilesystemLoader.php:250, Symfony\\Component\\ErrorHandler\\Error\\UndefinedMethodError(code: 0): Attempted to call an undefined method named \"getAuthor\" of class \"Odiseo\\BlogBundle\\Model\\ArticleComment\". at C:\\Users\\xx\\Desktop\\xx\\ xx\\website\\vendor\\odiseoteam\\sylius-blog-plugin\\src\\Form\\Extension\\ArticleUserCommentTypeExtension.php:24)"} []
Hi there,
after installing the bundle on a clean sylius 1.9.2 I get the following error:
In ParameterBag.php line 98:
You have requested a non-existent parameter "odiseo_blog.model.article.class".
I followed every step inside the documentation except the one with the API, that I dont want to use.
Hello
I have error when I try instal by composer
The service "odiseo_sylius_blog_plugin.factory.article_comment" has a dependency on a non-existent service "odiseo_blog.factory.article_comment".
Any idea how to fix this ?
I ❤️ your plugin. But trying a migration to 1.3, your plugin is not compatible with Sylius.
Hi,
I was trying to get the Plugin running on Sylius 1.9.2 and also Sylius 1.8.5 but without success.
I do get the following errors:
Problem 1
- odiseoteam/sylius-blog-plugin[v1.2.0, ..., v1.2.2] require odiseoteam/blog-bundle ^1.1 -> satisfiable by odiseoteam/blog-bundle[v1.1.0, ..., v1.1.23].
- odiseoteam/blog-bundle[v1.1.0, ..., v1.1.6] require symfony/framework-bundle ^3.4|^4.1 -> found symfony/framework-bundle[v3.4.0, ..., v3.4.47, v4.1.0, ..., v4.4.22] but the package is fixed to v5.2.5 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- odiseoteam/blog-bundle[v1.1.7, ..., v1.1.23] require monolog/monolog ~1.22 -> found monolog/monolog[1.22.0, ..., 1.26.0] but the package is fixed to 2.2.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- Root composer.json requires odiseoteam/sylius-blog-plugin ^1.2 -> satisfiable by odiseoteam/sylius-blog-plugin[v1.2.0, v1.2.1, v1.2.2].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
I tried to run the installation "--with-all-dependencies" but this totally broke my vendor.
Any help would be great!
Kind regards
Sylius version : 1.7.0
After creating a blog article and go to the listing (/admin/blog/articles/) I got this error
Return value of Odiseo\BlogBundle\Model\Article::getImages() must implement interface Doctrine\Common\Collections\Collection, null returned
Tested with an existed Sylius installation and a new one the same error occurs.
Hello,
i've follow all the docs but i've an error :
You have requested a non-existent parameter "odiseo_blog.model.article.class".
My _sylius.yaml:
imports:
- { resource: "@SyliusCoreBundle/Resources/config/app/config.yml" }
- { resource: "@SyliusAdminBundle/Resources/config/app/config.yml" }
- { resource: "@SyliusAdminApiBundle/Resources/config/app/config.yml" }
- { resource: "@SyliusShopBundle/Resources/config/app/config.yml" }
- { resource: "@OdiseoSyliusBlogPlugin/Resources/config/config.yml" }
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/config.yml" }
My bundles.php:
['all' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true], Sylius\Bundle\OrderBundle\SyliusOrderBundle::class => ['all' => true], Sylius\Bundle\MoneyBundle\SyliusMoneyBundle::class => ['all' => true], Sylius\Bundle\CurrencyBundle\SyliusCurrencyBundle::class => ['all' => true], Sylius\Bundle\LocaleBundle\SyliusLocaleBundle::class => ['all' => true], Sylius\Bundle\ProductBundle\SyliusProductBundle::class => ['all' => true], Sylius\Bundle\ChannelBundle\SyliusChannelBundle::class => ['all' => true], Sylius\Bundle\AttributeBundle\SyliusAttributeBundle::class => ['all' => true], Sylius\Bundle\TaxationBundle\SyliusTaxationBundle::class => ['all' => true], Sylius\Bundle\ShippingBundle\SyliusShippingBundle::class => ['all' => true], Sylius\Bundle\PaymentBundle\SyliusPaymentBundle::class => ['all' => true], Sylius\Bundle\MailerBundle\SyliusMailerBundle::class => ['all' => true], Sylius\Bundle\PromotionBundle\SyliusPromotionBundle::class => ['all' => true], Sylius\Bundle\AddressingBundle\SyliusAddressingBundle::class => ['all' => true], Sylius\Bundle\InventoryBundle\SyliusInventoryBundle::class => ['all' => true], Sylius\Bundle\TaxonomyBundle\SyliusTaxonomyBundle::class => ['all' => true], Sylius\Bundle\UserBundle\SyliusUserBundle::class => ['all' => true], Sylius\Bundle\CustomerBundle\SyliusCustomerBundle::class => ['all' => true], Sylius\Bundle\UiBundle\SyliusUiBundle::class => ['all' => true], Sylius\Bundle\ReviewBundle\SyliusReviewBundle::class => ['all' => true], Sylius\Bundle\CoreBundle\SyliusCoreBundle::class => ['all' => true], Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true], Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true], winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class => ['all' => true], Sonata\CoreBundle\SonataCoreBundle::class => ['all' => true], Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true], Sonata\IntlBundle\SonataIntlBundle::class => ['all' => true], Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle::class => ['all' => true], JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true], FOS\RestBundle\FOSRestBundle::class => ['all' => true], Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true], Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true], Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true], Payum\Bundle\PayumBundle\PayumBundle::class => ['all' => true], Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true], WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle::class => ['all' => true], Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['all' => true], Sylius\Bundle\FixturesBundle\SyliusFixturesBundle::class => ['all' => true], Sylius\Bundle\PayumBundle\SyliusPayumBundle::class => ['all' => true], Sylius\Bundle\ThemeBundle\SyliusThemeBundle::class => ['all' => true], Sylius\Bundle\AdminBundle\SyliusAdminBundle::class => ['all' => true], Sylius\Bundle\ShopBundle\SyliusShopBundle::class => ['all' => true], FOS\OAuthServerBundle\FOSOAuthServerBundle::class => ['all' => true], Sylius\Bundle\AdminApiBundle\SyliusAdminApiBundle::class => ['all' => true], Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true], Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true], Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true], Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true], Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true], FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true, 'test_cached' => true], Sylius\Behat\Application\SyliusTestPlugin\SyliusTestPlugin::class => ['test' => true, 'test_cached' => true], Odiseo\BlogBundle\OdiseoBlogBundle::class => ['all' => true], FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true], SitemapPlugin\SitemapPlugin::class => ['all' => true], BitBag\SyliusCmsPlugin\BitBagSyliusCmsPlugin::class => ['all' => true], Odiseo\SyliusBlogPlugin\OdiseoSyliusBlogPlugin::class => ['all' => true], ];
Sylius Version : 1.4
Thx for any help.
Hi,
I try to override the article resource, but I get following error :
Neither the property "translations" nor one of the methods "translations()", "gettranslations()"/"istranslations()"/"hastranslations()" or "__call()" exist and have public access in class "Symfony\Component\Form\FormView"
It seems that ArticleTranslation is not managed as a resource by Sylius.
While exploring plugin I've found bug that when I remove the comment from article then the article itself is also being removed.
I've found out that it's because of this yml code block:
manyToOne:
article:
targetEntity: Odiseo\BlogBundle\Model\ArticleInterface
inversedBy: comments
cascade: [ALL]
joinColumn:
name: article_id
referencedColumnName: id
onDelete: CASCADE
The bug caused by this cascade: cascade: [ALL]
and if it's changed to cascade: [persist]
then everything works fine.
This is the file and the line
vendor/odiseoteam/blog-bundle/src/Resources/config/doctrine/model/ArticleComment.orm.yml:38
Hello,
can you fix Fatal error: Type of Odiseo\BlogBundle\OdiseoBlogBundle::$mappingFormat must be string (as in class Sylius\Bundle\ResourceBundle\AbstractResourceBundle) in C:\xampp\htdocs\sudekusa-shop\vendor\odiseoteam\blog-bundle\src\OdiseoBlog Bundle.php on line 35
Problem is on php 8.0.19
sylius\sylius: 1.11.13
...
final class OdiseoBlogBundle extends AbstractResourceBundle
{
protected $mappingFormat = ResourceBundleInterface::MAPPING_YAML;
to
protected string $mappingFormat = ResourceBundleInterface::MAPPING_YAML;
...
Thank you
Hello
I extended class ArticleCategory and it works, but if I trying to add new article got error "Call to a member function get() on null".
This $this->translations, initialised in constructor (TranslatableTrait), return NULL. It's weird.
public function __construct()
{
$this->translations = new ArrayCollection();
}
My model:
declare(strict_types=1);
namespace App\Entity\Blog;
use Doctrine\ORM\Mapping as ORM;
use Odiseo\BlogBundle\Model\ArticleCategory as BaseArticleCategory;
use Odiseo\BlogBundle\Model\ArticleCategoryTranslation;
use Odiseo\BlogBundle\Model\ArticleCategoryInterface;
/**
* @ORM\Entity
* @ORM\Table(name="odiseo_blog_article_category")
*/
class ArticleCategory extends BaseArticleCategory implements ArticleCategoryInterface
{
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $wp_id;
/**
* @ORM\ManyToOne(targetEntity=ArticleCategory::class)
* @ORM\JoinColumn(onDelete="CASCADE")
*/
private $parent;
public function getWpId(): ?int
{
return $this->wp_id;
}
public function setWpId(int $wp_id): self
{
$this->wp_id = $wp_id;
return $this;
}
public function getParent(): ?self
{
return $this->parent;
}
public function setParent(?self $parent): self
{
$this->parent = $parent;
return $this;
}
protected function createTranslation(): ArticleCategoryTranslation
{
return new ArticleCategoryTranslation();
}
}
odiseo_blog.yaml
imports:
- { resource: "@OdiseoSyliusBlogPlugin/Resources/config/config.yaml" }
odiseo_blog:
resources:
article_category:
classes:
model: App\Entity\Blog\ArticleCategory
Thanks in advance for any help!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.