Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7847149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:48:03+00:00 2026-06-02T17:48:03+00:00

I have the importcsv module installed and the importcsv page loads fine. The file

  • 0

I have the importcsv module installed and the importcsv page loads fine. The file upload button appears when I load the url- https://web/importcsv

I upload a file, and the ajax “loading” text appears, however the ajax response turns out to be the entire layout of my site and the default importcsv upload page, rather that what I would assume is supposed to load in the importCsvFirstStepResult div (the “next step” fields), after the ajax request in download.js completes

 ...
   onComplete : function(file, response) {
        this.enable();
        $("input#fileName").val(file);
        $("div#importCsvFirstStepResult").html(response);
    }

The /importcsv/default/upload ajax response apparently contains the wrong layout, failed to detect the request, or ???? and loads that default view into the response div, menus and all. I’m fairly new to Yii so maybe this is obvious someone out there.

Thanks for your assistance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T17:48:05+00:00Added an answer on June 2, 2026 at 5:48 pm

    Solved my own problem. The ajax issue was due to me having tweaked (breaking) my urlManager rules. I changed the original rules to accomodate non-numeric primary keys on tables. For example the url to view a patient would be https://web/patients/view/ABC_1234 instead of https://web/patients/view/1234

    I tend to use existing db schema where possible and the way my clients db schema is set up now, they’re using a non-numeric primary key. I wanted to continue this for certain reasons so I had to edit the url params becuase \d only matches digits. Unfortunately changing it to \w also matched some ajax requests and broke the whole thing.

    Yii orginal rules. Works fine but doesn’t work for alphanumeric primary keys:

     'rules'=>array(
                    '<controller:\w+>/<id:\d+>'=>'<controller>/view',
                    '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
                    '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
                ),
    

    First I changed it to the following, to handle alphanumeric foreign keys, but this broke some ajax:

    'rules'=>array(
                    '<controller:\w+>/<action:\w+>/<id:\w+>'=>'<controller>/<action>',
                    '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
                    '/gii'=>'/gii/default/login',
            ),
    

    Finally arrived at the following, which allows ajax modules to function properly, and handles my non-numeric keys:

    'rules'=>array(
       '/libraries/<action:\w+>/<id:\w+>'=>'/libraries/<action>',
       '/patients/<action:\w+>/<id:\w+>'=>'/patients/<action>',
       '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
       '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
    ),
    

    I ended up explicitly setting rules just for the controllers that need it. Most of them use integer primary keys

    Hope this helps someone else. I was new to Yii and didn’t fully understand the rules and ajax system in Yii when I changed the rules.

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UTF-16 CSV file which I have to read. Python csv module
I have a problem with python module import. I installed django (this can be
I'm trying to import the tkinter module into my script. I have it installed
I have a python module that imports a module generated with swig. When I
How to read and import .csv file in groovy on grails. I have .csv
I have a small script we're using to read in a CSV file containing
I have written my own module, mainly handling a filefield for a django site.
I have two files in the same folder, Eval.hs and Data.hs , module in
If have this module # mymodule.py import __main__ And I import it in the
I have installed ActivePython 2.7 on Mac OS X 10.5. The main reason for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.