Code Monkey home page Code Monkey logo

dmtagplugin's Introduction

dmtagplugin's People

Contributors

4levels avatar lerler avatar ornicar avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dmtagplugin's Issues

Problems with case-insensitive / umlauts

preinfo:
diem/mysql uses normally utf8_general_ci as collation for the database tables.
utf8_general_ci means case-insensititive, additionally german umlauts (ä ö ü) will be converted to their normal equivalents.

In the function "getTagIds" in "lib/doctrine/extension/DmTaggable/Template/DmTaggable.php" a query will be done with whereIn (ids), the result will be added to a check array ($_existingTags).
Afterwards a string match will be done to check if tag is existing and should not be added.

Problem1:
DB: two tags , foo and bar are in the database

if i add 'Foo" (with uppercase character) the check will fail and a insert query will be done which will break (duplicate entry for 'foo') - thanks to Case-Insensitive

Problem2:
DB: two tags , foo and bar are in the database

if i add 'Föo" (with german umlaut) the check will fail and a insert query will be done which will break (duplicate entry for 'foo') - thanks to Case-Insensitive

solution:
see: http://github.com/lerler/dmTagPlugin/commit/1f861c72ac9bdc195cbb36c7898451215928cc19

basically, it does a query for each tag (which is slower), checks the result if existing (mysql converts internally), so the following query with 'föo' finds 'foo'

SELECT *
FROM dm_tag
WHERE name = 'föö'
LIMIT 0 , 30

result: foo

Validation problems make that the new tags disappear

If you are creating a new object, if there is a validation error al the tags that you have added get disappear.

If you are modifying an existing object, if there is a validation problem, the new tags that you added will disappear and there will be only the ones that are saved.

Problem with plugin under Diem 5.1.2

Hi,

I've some classes of content Article, Event, BlogPost.

I've installed correctly dmTagPlugin, and add it to my classes. In some of themes it works perfectly but in others no.

The strange thing is that in most forms it generates key: "tags" and it works, in some others that it do not work key is "tags_list".

I've change this key manualy, and after that , the tags now are inserted to DB (till nex dm:setup).
This tags still do not apears in form after saved it and try to edit.

dmTag taggable models fluctuates

It happens to me that I have different taggable models on different modules in the same project.
Recently I got unknown relation on admin's tag edit form (for taggable model). So I had to overwrite DmTagAdminForm and use $this->useField( array( 'id', name' ) );

We've got quite a lots of models taggable, some of them are using doctrine inheritance.

Results appears with case sensitive

I think that it will be necessary that it works like the autocompleter that comes in the sfFormExtraPlugin, that has not case sensitive for searching.

For example, if I put "james" and in the DB it is "James", this will not appears in the results.

Can't add certain tags

i can't add tags containing the word 'script'. Examples are : javascript, script, actionscript etc

Result appears repeated

The result given by the widget sfWidgetFormDmTagsAsString are repeated.

For example, if I put "action", it will appears many times "action" in the results.

tags are not saved when using DmTaggable under i18n as nested behavior

My content types have i18 behavior. I need the tags separated by language for each translation:
Artice:
actAs:
I18n:
actAs:
DmTaggable

It shows up on the form, but does not save the tags to the database.

I think it is because dmTagPluginConfiguration::listenToFormPostConfigureEvent(), since it is bound to the tables's behaviors, where it is looking for DmTaggable...

500 internal server error when trying to drag listByTag component into a page

I wanted to make projects viewable by tags so I installed dmTagPlugin and created a tag list which I can drop into any page. Then I added an additional component to my projects module for filtering "projects" by tag. I made sure that all dm:setup and other commandline steps have been carefully executed. But When I try to drag the listByTag component from my Projects module I get the widget loading image and it doesn't do anything. Upon further investigation, I found that there was a 500 internal server error thrown in firebug on the widget insertion ajax call. Looking at apache logs I found a message that said:

[Wed Jun 09 15:37:13 2010] [error] [client ::1] Diem can not filter projects by dmTag, referer: http://localhost/workspace/DiemUseCases/web/index.php

Here's my modules.yml:

Content:

Global:

main:                   # the main module is required, and must not be removed.
  components:
    header:
    footer:

Listings:

projects:
  components:
    list:
    show:
    listByTag:      { filters: dmTag }

AND Here's my schema.yml:

Projects:
actAs:
DmSortable:
I18n:
fields: [ title, extract, body, is_active ]
actAs:
Timestampable:
DmVersionable:
DmTaggable:
columns:
title: { type: string(120), notnull: true }
extract: { type: string(2000), notnull: true }
body: { type: clob, extra: markdown }
image: { type: integer }
author: { type: integer, notnull: true }
is_active: { type: boolean, notnull: true, default: false }
relations:
Image:
class: DmMedia
local: image
foreignAlias: Projects
Author:
class: DmUser
local: author
foreignAlias: Projects

sfWidgetFormDmTagsAsString: Optional creation of tags

It would be great if we could define in the schema if the creation of tags it's allowed in this widget.

It's very easy to do: it's have to be changed the "launcher.js". Puting "newel: true" for "newel: false" if it's is allowed or it isn't allowed to insert tags.

migration issue

From mlmarius:
after installation of dmTagPlugin i create a dmTaggable model like in the example and when runing doctrine:generate-migrations-diff i get the error :
Couldn't find class DmTag

Tag list admin page fails to load

I have 7 custom content type defined in a Diem project. All of this are dmTaggeble.

I can open the Tags list on the Admin site if and only I clear the cache, but the second request run out of execution time, when tries to join ALL the dmTaggable tables, their association tables and dmTag table (Doctrine Hydration runs forever...)

I use the latest git version of dmTagPlugin.

cannot list content tagged by a dmTag object

When I apply dmTaggable behavior on a custom content type (e.g. Article), I am able to list related Tags of an Article, but cannot get the Articles tagged by a dmTag.

I think dmTaggable behavior should add a relation to dmTag backward, so that we can get the Article list like this:

$tagged_articles_by_this_tag = $dmTag->getArticles();

I tried to add a relation to dmTag in the Doctrine_Template, but no success :(

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.