Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

124
Views
Document.querySelector: '#categories_description[1]' is not a valid selector

I have an error appear and I can not understand what happened with the script, sorry, I am a beginner. Document.querySelector: '#categories_description[1]' is not a valid selector

            for ($i = 0, $n = \count($languages); $i < $n; $i++) {
                 $name = 'categories_description[' . $languages[$i]['id'] . ']';
                 echo HTML::textAreaCkeditor($name, 'soft', '750', '300', (isset($categories_description[$languages[$i]['id']]) ? str_replace('& ', '&amp; ', trim($categories_description[$languages[$i]['id']])) : $CategoriesAdmin->getCategoryDescription($cInfo->categories_id, $languages[$i]['id'])), 'id="' . $name . '"'); ?>

Now on ckeditor

ClassicEditor
    .create(document.querySelector('#" . HTML::output($name) . "') , {
        toolbar: ['heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'imageUpload', 'ckfinder', 'blockQuote', 'insertTable', 'mediaEmbed', 'undo', 'redo', '|', 'help']
    } )
   ....

The problem seems tocome there : document.querySelector('#" . HTML::output($name)') dot accept the php array

I also tried this, does not work

$id = HTML::output($name);

ClassicEditor
    .create(document.querySelector('#{$id}') , {
        toolbar: ['heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'imageUpload', 'ckfinder', 'blockQuote', 'insertTable', 'mediaEmbed', 'undo', 'redo', '|', 'help']
    } ) 

Thank you

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!