CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #31885

Save and preview does not work on first click

Added by Felix Nagel over 1 year ago. Updated 5 months ago.

Status:Closed Start date:2011-11-17
Priority:Should have Due date:
Assignee:Georg Ringer % Done:

0%

Category:Backend
Target version:1.4.0
TYPO3 Version:4.7 Has patch:No
PHP Version:5.3 Complexity:
Votes: 1 (View)

Description

It seems you need to save a new record (at least one time) before using "save & preview", otherwise the Id of the record is incorrect (in my case its always tx_news_pi1[news]=4).

Steps to reproduce: Create a new record. Click "save and preview". Preview pop-up shows wrong article.
Workaround: Click "Save" before using "Save and preview"


Related issues

related to Extension news - Bug #32058: Save and preview does not work with localized, hidden rec... Resolved 2011-11-24

History

Updated by Georg Ringer over 1 year ago

  • Category changed from Frontend to Backend
  • Status changed from New to Accepted
  • Assignee set to Georg Ringer
  • Target version set to 1.3.0

i will try to come up with a solution

Updated by Georg Ringer over 1 year ago

  • Status changed from Accepted to Needs Feedback

are you inside a workspace or something like that?

tested with 4-7-dev (which should be the same as 4-6) and everything is fine!
you can get the uid here > Tx_News_Hooks_Tcemain -> processDatamap_afterDatabaseOperations > make an

 echo $recordUid . ', ';
before the "if(isset($GLOBALS...."

Updated by Felix Nagel over 1 year ago

Im not using workspaces or versioning.

I always get the correct record UID (even in line 66, just before

$GLOBALS['_POST']['popViewId'] = $pagesTsConfig['tx_news.']['singlePid'];
) and when using xdebug($GLOBALS['_POST']['popViewId_addParams']); the output seems valid:
&no_cache=1 &tx_news_pi1[controller]=News&tx_news_pi1[action]=detail&tx_news_pi1[news]=79

The preview URL is still wrong:
/index.php?id=153&tx_news_pi1[news]=4&L=0&cHash=7cb1572d9c7bb1d26bf5d63a00c13a91

Im using TYPO3 4.5.7 with news 1.1.2 and disabled RealURL

ps: there is a unwanted space between &no_cache=1 and &tx_news_pi1

Updated by Georg Ringer over 1 year ago

  • TYPO3 Version set to 4.6
  • Patch is reviewed set to No
  • Has patch set to No

can you again check the current master checkout as some things changed there. i can imagine that the unwanted space is your problem which souldnt be there anymore.

if still a problem, can you give me access to your testsystem?

Updated by Felix Nagel over 1 year ago

Deleting the space wont help (already removed in my local installation).

Sure, I will test this asap. Which files need to be updated?

Our local testsystem is not available from outside our network and Im not allowed to grant access to the productive installation. Perhaps our customer needs to complain again :-/

Updated by Georg Ringer over 1 year ago

just the tcemain file

Updated by Felix Nagel over 1 year ago

My current Tcemain.php and the current master match when comparing each other. Ive checked the history and see no changes since our last tests.
http://forge.typo3.org/projects/extension-news/repository/revisions/master/changes/Classes/Hooks/Tcemain.php

Updated by Georg Ringer over 1 year ago

  • Target version changed from 1.3.0 to 1.4.0

Updated by Felix Nagel 11 months ago

  • TYPO3 Version changed from 4.6 to 4.7
  • PHP Version set to 5.3

This problem persists in TYPO3 4.7.1 and latest trunk, tested in introduction package.

Updated by Georg Ringer 5 months ago

sorry still can't reproduce this. tested with current master of TYPO3 + news. can you retest too? (or give me access to your testing machine)

Updated by Felix Nagel 5 months ago

  • Status changed from Needs Feedback to Closed

I've tested this again with TYPO3 6.0 Intro and latest news master and the problem is no longer reproducible.

Also available in: Atom PDF