Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rescan Multilingual Locale does not work #8791

Closed
mlocati opened this issue Jun 20, 2020 · 4 comments
Closed

Rescan Multilingual Locale does not work #8791

mlocati opened this issue Jun 20, 2020 · 4 comments
Labels
Affects:Content Creators Affects those who use the UI to create or edit content. Bug Priority:Medium There’s a viable work around, but fixing this would make things much better. Product Areas:Internationalization Type:Bug Existing functionality not performing as expected.

Comments

@mlocati
Copy link
Contributor

mlocati commented Jun 20, 2020

  1. Install concrete5 8.5.4
  2. Login as admin
  3. Go to the DashboardSystemMultilingualMultilingual Setup page
  4. Add a second locale
  5. Go to the DashboardSystemMultilingualCopy Languages page
  6. Click the Rescan Locale in the Rescan Multilingual Tree section

You'll get this JSON error message:

{
   "errors":[
      "Serialization of 'Closure' is not allowed"
   ],
   "error":{
      "type":"Exception",
      "message":"Serialization of 'Closure' is not allowed",
      "file":"concrete/src/Foundation/Processor/ProcessorQueue.php",
      "line":89,
      "trace":[
         {
            "file":"concrete/src/Foundation/Processor/ProcessorQueue.php",
            "line":89,
            "function":null,
            "class":"Exception",
            "args":[
               "Serialization of 'Closure' is not allowed"
            ]
         },
         {
            "file":"concrete/src/Foundation/Processor/ProcessorQueue.php",
            "line":89,
            "function":"serialize",
            "class":null,
            "args":[
               {
                  "processor":{},
                  "subject":{
                     "cID":"193",
                     "cDisplayOrder":"0",
                     "cParentID":1,
                     "level":1,
                     "total":0
                  },
                  "target":{},
                  "task":{}
               }
            ]
         },
         {
            "file":"concrete/controllers/single_page/dashboard/system/multilingual/copy.php",
            "line":52,
            "function":"process",
            "class":"Concrete/Core/Foundation/Processor/ProcessorQueue",
            "args":[]
         },
      ]
   }
}

The reason of this issue is that we are calling serialize() on a multilingual Section, which contains a reference to a SiteTree entity, which is not yet fully loaded, so it contains an $__initializer__ property which has a Closure value, which can't be serialized by the PHP serialize() function.

@danielgasser
Copy link
Contributor

confirmed

@mlocati
Copy link
Contributor Author

mlocati commented Jun 22, 2020

@aembler which base branch should I use to submit a patch for this issue?

@aembler
Copy link
Member

aembler commented Jul 23, 2020

8.5.x for current development on 8.5 – and develop for version 9 if it's also present on 9

@aembler aembler added Affects:Content Creators Affects those who use the UI to create or edit content. Bug Priority:Medium There’s a viable work around, but fixing this would make things much better. Product Areas:Internationalization Type:Bug Existing functionality not performing as expected. labels Jul 23, 2020
@marcelaerts
Copy link

Is there a way to fix this for 8.5.4? Instead of waiting for a new release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects:Content Creators Affects those who use the UI to create or edit content. Bug Priority:Medium There’s a viable work around, but fixing this would make things much better. Product Areas:Internationalization Type:Bug Existing functionality not performing as expected.
Projects
None yet
Development

No branches or pull requests

4 participants