Code Monkey home page Code Monkey logo

Comments (7)

fritzmg avatar fritzmg commented on May 30, 2024

I don't think this is related to this extension.

from contao-component-style-manager.

mlwebworker avatar mlwebworker commented on May 30, 2024

Wo könnte die Ursache liegen?
Ich habe so ein Verhalten schon mal bei einer anderen Installation beobachtet, auch als ich diese Erweiterung deinstalliert habe. Habe damals allerdings nicht die Zeit gehabt es genau zu dokumentieren.

from contao-component-style-manager.

fritzmg avatar fritzmg commented on May 30, 2024

Versuche in einer frischen Installation mal folgendes:

// contao/dca/tl_content.php
$GLOBALS['TL_DCA']['tl_content']['fields']['cssID']['sql'] = "text NULL";

Dann

vendor/bin/contao-console cache:clear --no-warmup --env=prod
vendor/bin/contao-console cache:warmup --env=prod
vendor/bin/contao-console contao:migrate --no-interaction

Dann die Änderung in contao/dca/tl_content.php wieder entfernen. Dann

vendor/bin/contao-console cache:clear --no-warmup --env=prod
vendor/bin/contao-console cache:warmup --env=prod
vendor/bin/contao-console contao:migrate --no-interaction
vendor/bin/contao-console contao:migrate --no-interaction

Kommt dann beim letzten contao:migrate

ALTER TABLE tl_content CHANGE cssID cssID VARCHAR(255) DEFAULT '' NOT NULL

wieder?

from contao-component-style-manager.

mlwebworker avatar mlwebworker commented on May 30, 2024

Das kommt nur nach dem ersten contao:migrate

xxx@w10:~/public/test/manager_test$ vendor/bin/contao-console cache:clear --no-warmup --env=prod

 // Clearing the cache for the prod environment with debug
 // false

 [OK] Cache for the "prod" environment (debug=false) was successfully cleared.

xxx@w10:~/public/test/manager_test$ vendor/bin/contao-console cache:warmup --env=prod

 // Warming up the cache for the prod environment with debug
 // false

 [OK] Cache for the "prod" environment (debug=false) was successfully warmed.

xxx@w10:~/public/test/manager_test$ vendor/bin/contao-console contao:migrate --no-interaction

 [INFO] Creating a database dump to "backup__20231104121600.sql.gz" with the
        default options. Use --no-backup to disable this feature.

Pending database migrations (8130ee31b924e316245b60a1e29019bfedf806d7cbfaa979803c4082729764fc)
----------------------------------------------------------------------------------------------

 * ALTER TABLE tl_content CHANGE cssID cssID VARCHAR(255) DEFAULT '' NOT NULL

Execute database migrations
---------------------------

 * ALTER TABLE tl_content CHANGE cssID cssID VARCHAR(255) DEFAULT '' NOT NULL

 [OK] Executed 1 SQL queries.

 [OK] All migrations completed.

xxx@w10:~/public/test/manager_test$ vendor/bin/contao-console contao:migrate --no-interaction

 [INFO] Database dump skipped because there are no migrations to execute.

 [OK] All migrations completed.

from contao-component-style-manager.

zoglo avatar zoglo commented on May 30, 2024

@mlwebworker,
der StyleManager erweitert das Feld cssID auf "text NULL", sodass Leute auch mehr Klassen hinzufügen können.
Ich gehe stark davon aus, dass du in gewissen CSS-IDs noch längere Werte als 255 drin stehen hast?

Wichtiger wäre, dass du in diesen Installationen mal eine solche Datenbank kopierst und über SQL einen der hier genannten Befehle ausführst:

ALTER TABLE tl_article CHANGE cssID cssID VARCHAR(255) DEFAULT '' NOT NULL
ALTER TABLE tl_content CHANGE cssID cssID VARCHAR(255) DEFAULT '' NOT NULL
ALTER TABLE tl_layout CHANGE cssClass cssClass VARCHAR(255) DEFAULT '' NOT NULL
ALTER TABLE tl_module CHANGE cssID cssID VARCHAR(255) DEFAULT '' NOT NULL
ALTER TABLE tl_page CHANGE cssClass cssClass VARCHAR(64) DEFAULT '' NOT NULL

Sofern hier eine Fehlermeldung geliefert wird, gerne hier rein posten.
Du kannst mir den Dump auch gerne an unsere E-Mail-Adresse zukommen lassen:
[email protected]

from contao-component-style-manager.

zoglo avatar zoglo commented on May 30, 2024

I'd recommend checking the database tables with this query and cleaning up the cssID to be lower than 255:

SELECT 'tl_article', id FROM tl_article WHERE LENGTH(cssID) > 255
    UNION 
SELECT 'tl_content', id FROM tl_content WHERE LENGTH(cssID) > 255  
    UNION 
SELECT 'tl_calendar_events', id FROM tl_content WHERE LENGTH(cssID) > 255  
    UNION 
SELECT 'tl_form', id FROM tl_content WHERE LENGTH(cssID) > 255  
    UNION 
SELECT 'tl_form_field', id FROM tl_content WHERE LENGTH(cssID) > 255  
    UNION 
SELECT 'tl_layout', id FROM tl_content WHERE LENGTH(cssID) > 255  
    UNION 
SELECT 'tl_module', id FROM tl_module WHERe LENGTH(cssID) > 255
    UNION 
SELECT 'tl_news', id FROM tl_content WHERE LENGTH(cssID) > 255
    UNION 
SELECT 'tl_page', id FROM tl_content WHERE LENGTH(cssID) > 255;

from contao-component-style-manager.

mlwebworker avatar mlwebworker commented on May 30, 2024

Ich konnte das leider nicht noch einmal nachvollziehen, da ich das bei dem betroffenen Projekt dann manuell bereinigt hatte. Ich achte mal drauf, falls ich das Problem bei einem anderen Projekt noch einmal habe.

from contao-component-style-manager.

Related Issues (20)

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.