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

No snippet return in the combo-box #8

Closed
phron opened this issue May 15, 2012 · 13 comments
Closed

No snippet return in the combo-box #8

phron opened this issue May 15, 2012 · 13 comments

Comments

@phron
Copy link

phron commented May 15, 2012

Hello
Using either Revo2.2 and Revo2.3 for both I entounter a problem with CronManager that does not list the snippets...
No error in the log ,(neither in modx log or apache log) ...
Hope you can do something I really need CronManager as prerequesite for use with GroupEletters
Thanks

Is there a version for revo2.3?
Cheers

@bertoost
Copy link

I don't see MODX 2.3 yet.. But when I'm able to test it (I'm in the hospital right now), I will look at it as soon as possible

@phron
Copy link
Author

phron commented May 15, 2012

Thanks a lot
Hope there's nothing serious with your health (you're in hospital)...
Cheers

@bertoost
Copy link

Not anymore.. My inflamed appendix is removed and I'll just be at home now.. Hope I can pick up work tomorrow :-)

@rtripault
Copy link
Contributor

Quick & dirty re-factoring of the snippets/getlist processor (class based) that should fix the issue :

require_once (MODX_CORE_PATH . 'model/modx/processors/element/snippet/getlist.class.php');

class cmSnippetGetListProcessor extends modSnippetGetListProcessor {

    public function prepareQueryBeforeCount(xPDOQuery $c) {
        $c->leftJoin('modCategory','Category');

        $query = $this->getProperty('query');
        if (!empty($query)) {
            $c->where(array(
                'name:LIKE' => '%'.$query.'%',
            ));
        }

        $id = $this->getProperty('id');
        if (!empty($id)) {
            $c->where(array(
                'id' => $id,
            ));
        }

        return $c;
    }
}
return 'cmSnippetGetListProcessor';

Get well soon Bert :)

@bertoost
Copy link

Okay thanks for that but MODX should be backwards compatible so I will dive into that because I don't have time to refactor all of the processors and I would it be the same for all

rtripault added a commit to meltingmedia/MODX-CronManager that referenced this issue May 15, 2012
@rtripault
Copy link
Contributor

My bad, it has nothing to do with the processor. ExtJS submit false as an integer, thus making the processor search for the snippet with id 0…

By the way Bert, if you want me too i can handle the processor re-factoring (class based) but that will break the compatibility with Revo < 2.2

@bertoost
Copy link

Cool! If you would like to do it and able to, trough github we can merge easily so that would save some time for me

rtripault added a commit to meltingmedia/MODX-CronManager that referenced this issue May 19, 2012
@PeteBoucher
Copy link

I'm not sure if it's just me or this issue has resurfaced.

I'm on MODX 2.2.6-pl and installed cronManager 1.1 through the Package Manager.

No snippets appear in the combo box, auto-completeon does not work and job always saves with snippet 'Undefined'.

I looked at rtripault's fix but my version doesn't have a cronmanager/js folder to apply the code changes to.

@bertoost
Copy link

bertoost commented May 7, 2013

Please check if you got any request errors, in the console (F12 on Windows browsers like Chrome and Firefox+Firebug).. Probably some 500 server errors I think

@PeteBoucher
Copy link

Ok now I'm getting auto-complete on snippets, but the full list of snippets still doesn't populate on clicking the drop-down.

Below is a screenshot from Chrome 'Timeline Recording'. Requests to connector.php are returning 200 but empty if no text is typed into the combo box:
screen shot 2013-05-07 at 15 22 14

@bertoost
Copy link

bertoost commented May 7, 2013

returning 200 doesn't say all. Can you check the error log? Maybe you can find some errors which are related to this, and can you click on a connector request to see what the response is of the combobox results? Above the screen is not from the combobox ;-)

@PeteBoucher
Copy link

Thanks for your help bertoost. There are no errors in the javascript console log:
screen shot 2013-05-07 at 16 45 53

Clicking on the drop down generates a request to connector.php for auto complete options, however if no text is present the json result is empty:
screen shot 2013-05-07 at 16 47 20

after typing characters into the text area of the drop down (combo box?) a list of results is returned and the suggestions display as expected:
{"total":"7","results":[{"id":19,"source":0,"property_preprocess":false,"name":"Gallery","description":...

@Jako
Copy link
Owner

Jako commented Sep 10, 2019

Should be fixed with 1.2.0

@Jako Jako closed this as completed Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants