Coder Social home page Coder Social logo

contentbundle's People

Contributors

chyzas avatar dvondrak avatar gimikus avatar grandltu avatar gyka avatar kazysgurskas avatar rolandaszelionka avatar saimaz avatar tautelis avatar tautrimas avatar trylika avatar

Stargazers

 avatar  avatar

Watchers

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

contentbundle's Issues

[doc] Touch-up needed

  • links to other parts of documentation are broken
  • more in-depth documentation is needed
  • more developer-centric / internals documentation would be nice.

ContentService::getDocumentBySlug trigger error Undefined index

If no results were found this error is given

Undefined index:

ContentBundle/vendor/ongr/elasticsearch-bundle/Result/AbstractResultsIterator.php:96
ContentBundle/vendor/ongr/elasticsearch-bundle/Result/AbstractResultsIterator.php:47
ContentBundle/Service/ContentService.php:55

Category product count

This feature could be really useful if implemented out of the box. If it takes longer to execute than expected, enhancment should be optional.

Optional parameter is actually required.

For

{{ getCategoryChildTree() }}

Last parameter fromCategory is required (Exception "Category Id must be defined on getPartialTree() method" is thrown without it), but documentation states that it is optional.

Also it would be logical to make this parameter first as it is the defining parameter for this function.

Wrong sync storage behaviour when all three operations exist.

Lets say we have a storage table that looks like this table:

+----+------+---------------+----------------------------------+---------------------+--------+
| id | type | document_type | document_id                      | timestamp           | status |
+----+------+---------------+----------------------------------+---------------------+--------+
|  1 | U    | product       | 6b698c33118caee4ca0882c33f513d2f | 2015-01-22 15:20:25 |      0 |
|  2 | U    | product       | 6b6a6aedca3e438e98d51f0a5d586c0b | 2015-01-22 15:20:25 |      0 |
|  3 | C    | product       | id0                              | 2015-01-22 15:20:25 |      0 |
|  4 | C    | product       | id1                              | 2015-01-22 15:20:25 |      0 |
|  5 | C    | product       | id2                              | 2015-01-22 15:20:25 |      0 |
|  6 | U    | product       | id0                              | 2015-01-22 15:20:25 |      0 |
|  7 | U    | product       | id1                              | 2015-01-22 15:20:25 |      0 |
|  8 | U    | product       | id2                              | 2015-01-22 15:20:25 |      0 |
|  9 | D    | product       | id1                              | 2015-01-22 15:20:27 |      0 |
+----+------+---------------+----------------------------------+---------------------+--------+
9 rows in set (0.01 sec)

Document id1 has three operations: CREATE (C), UPDATE (U), DELETE (D). In original table this document doesn't exists, but Sync/StorageManager/MysqlStorageManager::addRecord() method tries to access this document and sets $this->currentEntity to null. Then SyncStorageImportIterator::next() goes to second IF statement and the status of $this->currentEntity becomes $this->valid = false and Pipeline stops working.

Final status of storage table becomes:

+----+------+---------------+----------------------------------+---------------------+--------+
| id | type | document_type | document_id                      | timestamp           | status |
+----+------+---------------+----------------------------------+---------------------+--------+
|  4 | C    | product       | id1                              | 2015-01-22 15:20:25 |      1 |
|  5 | C    | product       | id2                              | 2015-01-22 15:20:25 |      0 |
|  6 | U    | product       | id0                              | 2015-01-22 15:20:25 |      0 |
|  7 | U    | product       | id1                              | 2015-01-22 15:20:25 |      0 |
|  8 | U    | product       | id2                              | 2015-01-22 15:20:25 |      0 |
|  9 | D    | product       | id1                              | 2015-01-22 15:20:27 |      0 |
+----+------+---------------+----------------------------------+---------------------+--------+

Sync storage should simplify operations for id1 document and leave only DELETE (D) operation (for removing from ES).

Problem with CategoryService root id

const ROOT_CATEGORY_ID = 'category_rood_id'; - it doesn't work. Should be moved to config. Workaround is change value to 'oxrootid'.

method buildQuery()
$search->addQuery(new TermQuery('is_active', true), 'must');
should be $search->addQuery(new TermQuery('active', true), 'must');

In CategoryTrait needs to change:
from * @es\Property(type="boolean", name="is_active")
to * @es\Property(type="boolean", name="active")

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.