プロジェクト

全般

プロフィール

Backport(バックポート) #3729

スマートフォンからコミュニティ画像を変更すると画像だけのコミュニティが作成される

isao sano9年以上前に追加. ほぼ9年前に更新.

ステータス:
Fixed(完了)
優先度:
High(高め)
担当者:
対象バージョン:
開始日:
2014-04-09
期日:
進捗率:

100%


説明

概要

スマートフォンからコミュニティ画像を変更すると、参加者、コミュニティ名、説明文のないコミュニティが作成される。
このコミュニティは管理者が存在しないため削除を行うことは出来ない。

なお、スマートフォン版のコミュニティトップページには「コミュニティ編集」の導線はないため、直接URLを指定して編集を行った。
そもそもスマートフォンで「コミュニティ編集」画面に遷移できる事自体に問題があるのかもしれない。

再現環境

  • OpenPNE 3.8.10
  • OpenPNE 3.8.11

opCommunityTopicPlugin の有無は関連しない

再現手順

1. スマートフォンより任意のコミュニティAの管理者でログイン
2. コミュニティAのコミュニティ編集ページのURL(/community/edit?id=XX)を指定する
3. 写真を選択し、編集ボタンを押下
4. コミュニティAの画像は変更されない
5. 画像だけのコミュニティが作成されている

画像だけコミュニティ.png 表示 (75.1 KB) isao sano, 2014-04-09 13:52

スクリーンショット 2014-05-26 16.11.58.png 表示 (620 KB) Akihiro KOBAYASHI, 2014-05-26 16:27


関連するチケット

コピー元 OpenPNE 3 - Bug(バグ) #3588: スマートフォンからコミュニティ画像を変更すると画像だけのコミュニティが作成される Won't fix(対応せず) 2014-04-09

関係しているリビジョン

リビジョン 32588ac6 (差分)
isao sanoほぼ9年前に追加

fix not to create empty Community( except image) if a Community created by smartphone(refs #3729, BP from #3588)

リビジョン 866ad999 (差分)
isao sanoほぼ9年前に追加

Modified so as not to create a communityFileForm class if do not use file upload(refs #3729, BP from #3588)

リビジョン 6cd6fc25 (差分)
isao sanoほぼ9年前に追加

It aligned the indentation (refs #3729, BP from #3588)

リビジョン 8792c5bf (差分)
isao sanoほぼ9年前に追加

Modified to branch on whether non- mobile or mobile (refs #3729, BP from #3588)

リビジョン b06f4edf (差分)
isao sanoほぼ9年前に追加

Processing of communityConfigForm has been changed to the common ones (refs #3729, BP from #3588)

リビジョン 3f69572b (差分)
isao sanoほぼ9年前に追加

Change to get the Parameters from the Form (refs #3729, BP from #3588)

リビジョン d8591063 (差分)
isao sanoほぼ9年前に追加

Fixed a getFiles() to get the parameters from the Form (refs #3729, BP from #3588)

リビジョン eac6a052
Shinichi Urabeほぼ9年前に追加

Merge pull request #253 from isaosano/t-3729

fix not to create empty Community( except image) if a Community created by smartphone(refs #3729, BP from #3588)

履歴

#1 isao sano9年以上前に更新

  • コピー元 Bug(バグ) #3588: スマートフォンからコミュニティ画像を変更すると画像だけのコミュニティが作成される を追加

#2 isao sano9年以上前に更新

  • 対象バージョンOpenPNE 3.8.14 にセット

#3 isao sano9年以上前に更新

  • ステータスNew(新規) から Accepted(着手) に変更

#4 isao sano9年以上前に更新

  • ステータスAccepted(着手) から Pending Review(レビュー待ち) に変更
  • 進捗率0 から 50 に変更

https://github.com/openpne/OpenPNE3/pull/221
にてプルリクエストしました

#5 Shinichi Urabe9年以上前に更新

  • 担当者isao sano にセット

担当を設定ください(差し戻し対応が誰か不明になるため)

#6 isao sano9年以上前に更新

  • 対象バージョンOpenPNE 3.8.14 から OpenPNE 3.8.x に変更

#7 Chiharu Nakajima約9年前に更新

  • 対象バージョンOpenPNE 3.8.x から OpenPNE 3.8.15 に変更

#8 Rimpei Ogawa約9年前に更新

  • ステータスPending Review(レビュー待ち) から Rejected(差し戻し) に変更

親チケットを差し戻しました。
https://redmine.openpne.jp/issues/3588#note-15

#9 Chiharu Nakajima約9年前に更新

  • 対象バージョンOpenPNE 3.8.15 から OpenPNE 3.8.x に変更

今回の対応から外します。

#10 kaoru n約9年前に更新

  • 対象バージョンOpenPNE 3.8.x から OpenPNE 3.8.16 に変更

#11 isao sanoほぼ9年前に更新

  • ステータスRejected(差し戻し) から Accepted(着手) に変更
  • 進捗率50 から 0 に変更

#12 isao sanoほぼ9年前に更新

  • ステータスAccepted(着手) から Pending Review(レビュー待ち) に変更
  • 進捗率0 から 50 に変更

プルリクエストしました。
https://github.com/openpne/OpenPNE3/pull/251

https://github.com/isaosano/OpenPNE3/commit/7b5ce17f48faaa4c4ccaa706ceda853665b4f50a
の lib/action/opCommunityAction.class.php の修正に関してですが、コードをなるべく書き足さない方法で以下も考えられましたが、可読性を優先させました。

$this->communityForm       = new CommunityForm($this->community);
    $this->communityConfigForm = new CommunityConfigForm(array(), array('community' => $this->community));
    if (!$this->unusedImage){$this->communityFileForm = new CommunityFileForm(array(), array('community' => $this->community));}

    if ($request->isMethod('post'))
    {
      $params = $request->getParameter('community');
      $params['id'] = $this->id;
      $this->communityForm->bind($params);
      $this->communityConfigForm->bind($request->getParameter('community_config'));
      if($this->communityFileForm)
      {
        $this->communityFileForm->bind($request->getParameter('community_file'), $request->getFiles('community_file'));
      }
      if ($this->communityForm->isValid() && $this->communityConfigForm->isValid() && (!$this->communityFileForm || $this->communityFileForm->isValid()))
        {
          $this->communityForm->save();
          $this->communityConfigForm->save();
          if($this->communityFileForm)
          {
            $this->communityFileForm->save();
          } 
          $this->redirect('@community_home?id='.$this->community->getId());
        }
    }

レビューお願いします。

#13 Shinichi Urabeほぼ9年前に更新

  • ステータスPending Review(レビュー待ち) から Rejected(差し戻し) に変更

master にまずプルリクエストして、フィードバックをレビュー待ちにしてください
if の書き方がコーディング規約に違反しているので、見直してください。
コーディング規約にはないですが不要な空白文字があります

[OpenPNE3]$ git diff 9e513ac320adc55cf5efeeb7a36cc9d3de6440be.. --check
lib/action/opCommunityAction.class.php:95: trailing whitespace.
+    

opCommunityAction::$unusedImage はPC、スマホからの処理の場合、未定義の変数です。dev モードだと Notice がでているはずです
モバイル専用のアクションを追加する必要もないので !sfConfig::get('app_is_mobile', false) で分岐すれば良いだけかと思います

#14 isao sanoほぼ9年前に更新

  • ステータスRejected(差し戻し) から Accepted(着手) に変更
  • 進捗率50 から 0 に変更

#15 isao sanoほぼ9年前に更新

  • ステータスAccepted(着手) から Pending Review(レビュー待ち) に変更
  • 進捗率0 から 50 に変更

#16 isao sanoほぼ9年前に更新

  • ステータスPending Review(レビュー待ち) から Accepted(着手) に変更
  • 進捗率50 から 0 に変更

#17 isao sanoほぼ9年前に更新

  • ステータスAccepted(着手) から Pending Review(レビュー待ち) に変更
  • 進捗率0 から 50 に変更

https://github.com/openpne/OpenPNE3/pull/253
にてプルリクエストしました。

note-12 で行ったプルリクエストは誤りなため取り下げました。

#18 Shinichi Urabeほぼ9年前に更新

  • ステータスPending Review(レビュー待ち) から Rejected(差し戻し) に変更

一個見落としていました。細かいですし、動作に問題ないですが http://redmine.openpne.jp/issues/3588#note-27 の差し戻しの理由で、本チケットも差し戻します

#19 isao sanoほぼ9年前に更新

  • ステータスRejected(差し戻し) から Accepted(着手) に変更
  • 進捗率50 から 0 に変更

#20 isao sanoほぼ9年前に更新

  • ステータスAccepted(着手) から Pending Review(レビュー待ち) に変更
  • 進捗率0 から 50 に変更

note-18 に関して修正しました。
https://github.com/openpne/OpenPNE3/pull/253

#21 Shinichi Urabeほぼ9年前に更新

  • ステータスPending Review(レビュー待ち) から Pending Testing(テスト待ち) に変更
  • 進捗率50 から 70 に変更

#22 isao sanoほぼ9年前に更新

  • ステータスPending Testing(テスト待ち) から Pending Merge(マージ待ち) に変更
  • 進捗率70 から 80 に変更

単体テスト完了しました。
マージお願いします。

#23 Shinichi Urabeほぼ9年前に更新

  • ステータスPending Merge(マージ待ち) から Fixed(完了) に変更
  • 進捗率80 から 100 に変更

他の形式にエクスポート: Atom PDF