Project

General

Profile

Actions

Bug #81801

closed

ckEditor: Text-Align "Center" not working

Added by Gute Botschafter almost 7 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2017-07-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If one tries to center-align text in the ckEditor via the center-align-button, it does not work correctly.
Instead of adding the class "text-center" to the applied element, the class "text-left" is added (see appended screenshot).

All other options (text-left, text-right, text-justify) work properly.


Files

screenshot.jpg (54.8 KB) screenshot.jpg Screenshot Gute Botschafter, 2017-07-05 14:14
Screenshot_1.png (9.71 KB) Screenshot_1.png Angelo Previtali, 2017-07-13 09:27
Screenshot_2.png (9.29 KB) Screenshot_2.png Angelo Previtali, 2017-07-13 09:27
typo3-rte_ckeditor-wrong-stylesheet-path.png (105 KB) typo3-rte_ckeditor-wrong-stylesheet-path.png Ludwig Rafelsberger, 2017-10-03 18:11
typo3-rte_ckeditor-inexistent-stylesheet-path.png (35.4 KB) typo3-rte_ckeditor-inexistent-stylesheet-path.png Ludwig Rafelsberger, 2017-10-03 18:17
Schermata 2017-10-25 alle 23.59.49.png (337 KB) Schermata 2017-10-25 alle 23.59.49.png Riccardo De Contardi, 2017-10-26 00:02

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #84000: Justify buttons are not displayed correctly while overriding justify-classes in custom RTE configurationClosed2018-02-21

Actions
Actions #1

Updated by Riccardo De Contardi almost 7 years ago

  • Status changed from New to Needs Feedback

Sorry, I am not able to reproduce it with both 8.7.3 and latest master. Could you give us more information about your setup? Is it a fresh TYPO3 install or do you use some extensions?

Updated by Angelo Previtali almost 7 years ago

I can confirm a similar thing: If you edit a text with the EXT:ckeditor, you will mark a text and add "center" as alignement, the editor will correctly generate text-align=center but the icon still is on the initial alignement=left posision.

We use 8.7.3 with PHP 7.1

Actions #3

Updated by Riccardo De Contardi almost 7 years ago

Still not able to reproduce the issue reported by @Angelo Previtali, but I am using PHP 7.0.15. I don't know if it is important.
Is there some javascript error somewhere?

Updated by Ludwig Rafelsberger over 6 years ago

I can reproduce the issue, also getting

<p class="align-center"></p>
in the code view, but no visual clue and the left-align icon still active.

Is there some javascript error somewhere?

I do have a javascript-related error:

The mentioned file does not exist there:

Seems like a wrong path somewhere to me… The failing CSS load is initiated from a minified javascript (Contrib/ckeditor.js - sorry I am not javascript/frontend-fit enough to dig any further…)

Actions #5

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Needs Feedback to New
Actions #6

Updated by Riccardo De Contardi over 6 years ago

I am using TYPO3 8.7.8 and I am still not able to reproduce the issue;

I also don't have missing files: the content.css file is in the folder rte_ckeditor/Resources/Public/Css/ - see attached file

Actions #7

Updated by Riccardo De Contardi about 6 years ago

  • Status changed from New to Needs Feedback

I've tested again with 8.7.9 and I am still not able to reproduce the issue.

Actions #8

Updated by Riccardo De Contardi about 6 years ago

Not reproducible on 9.2.0-dev, too.

Actions #9

Updated by Jan Stockfisch about 6 years ago

I can verify (TYPO3 8.7.10) the described problem from Angelo Previtali. Will open a new issue for that, scince it's different from the original topic and also test it on my TYPO3 v9 instance.

EDIT: The Issue is #84000 (also referenced above) and this also is in current master.

Actions #10

Updated by Jan Stockfisch about 6 years ago

  • Related to Bug #84000: Justify buttons are not displayed correctly while overriding justify-classes in custom RTE configuration added
Actions #11

Updated by Alexander Opitz almost 6 years ago

So does this issue still exists or can the issue be closed?

Actions #12

Updated by Riccardo De Contardi over 5 years ago

  • Status changed from Needs Feedback to Closed

No feedback since the last 90 days => closing this issue; moreover the related issue has been closed by request of its author.

If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one.

Thank you and best regards

Actions #13

Updated by Gerrit Hübbers over 2 years ago

Noteworthy:

TYPO3 CKEditor's text alignment classes were changed in 2017, e.g. from .align-center to .text-center.

https://github.com/TYPO3-CMS/rte_ckeditor/commit/76ae7a714be53dc63446ded38527201a20c897dc

TYPO3 installations that already existed before this change may still have those outdated CSS classes flying around in their database, e.g. in tt_content.bodytext.

Example sQL query for checking on align-center (sorted by creation date):

SELECT * FROM tt_content WHERE bodytext LIKE '%align-center%' AND t3_origuid = 0 and deleted = 0 AND hidden = 0 ORDER BY crdate desc;

Actions

Also available in: Atom PDF