1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

1.7 Database Collation

Discussion in 'General Troubleshooting' started by noreplay, Jul 1, 2016.

  1. noreplay

    noreplay New Member

    Code:
    ALTER TABLE `hotaru_posts` CHANGE `post_orig_url` `post_orig_url` VARCHAR(3000); 
    I see. should I change my Hotaru-cms according this cod? In which file?
    Please Excuse me but I am new on Hotaru-Cms and I don't Know very much about CMS structure. could you tell me more specific about this fix by file and folder name? or I must wait for the next version. (please forgive me for my bad English)
     
  2. valMETNG

    valMETNG Administrator Staff Member Admin

    My apologies for not being clear. This is an SQL statement that will modify the database. It's not PHP code. You'll want to run this using whatever MySQL database tool you use. (My preferred MySQL tool is sqlyog; I don't remember what is available in the XAMPP environment - probably PHPMyAdmin?)

    If you prefer to change the Hotaru install code so that this is performed whenever you install Hotaru from scratch, you can change line 297 in \install\libs\install_tables.php to:
    Code:
    `post_orig_url` varchar(3000) NULL,
    Just remember that if you change the install code, you'll need to make sure future versions also are changed.
     
  3. noreplay

    noreplay New Member

    I change the code as you write. and install Hotaru-CMS again, but the problem with friendly Urls still exist.
    by the way. thanks to you and Hotaru Team for helping me.
    for my Last Question: What is Hotaru means in Hotaru orginal Language? ( I don't know where is Hotaru homeland?)
    Thanks guys,
    thanks to you Dear valMETNG.
     
  4. valMETNG

    valMETNG Administrator Staff Member Admin

    You're welcome.

    Please check your database - can you confirm that the post_orig_url column in the hotaru_posts table now shows as varchar with a length of 3000? When you do the reinstall, you have to completely remove the existing database; did you do that? (If you didn't, it won't change the table because it already exists.) And just to confirm: when you say the problem with friendly URLs still exists, are you specifically referring to the problem with the link you provided earlier or is this a different problem? If the column now shows varchar with a length of 3000, if you'll put your build on a host that I can access (PM me the login credentials - do not post them in the forum), I'll take a look.

    Hotaru is Japanese for firefly. :)
     
  5. noreplay

    noreplay New Member

    how nice. :)
    I love firefly, this is in your logo. I didn't saw that.! my bad.

    I delete previous database and create new one, every time I do this. for any Scripts.
    as you can see I change the code:

    [​IMG]
    Link of 1st picture
    [​IMG]
    Link of 2nd picture
    [​IMG]
    Link of 3rd picture
    [​IMG]
    Link of last picture

    I don't understand your point =>
    Excuse me for my poor English.
     
  6. valMETNG

    valMETNG Administrator Staff Member Admin

    Thanks for the images. Yes, the column now shows varchar(3000). That's good - you did it right. Would you please try this fix? I don't believe @shibuya246 has incorporated this yet into the latest build as it was missed in the last release.
     
  7. noreplay

    noreplay New Member

    Thank you very much, You solved my problem.

    Finally, YOHOOOOOOO. :)
    You are the best.:);):)

    Is this change is safe and other English URLs work at the same time correctly? if yes, why Hotaru CMS team not apply this change on 1.7.x version?
     
    valMETNG likes this.
  8. valMETNG

    valMETNG Administrator Staff Member Admin

    It is safe for all other URLs. Unfortunately, it was an oversight and missed getting incorporated into the last version but should be in the next one.
     
  9. noreplay

    noreplay New Member

    after solving previous problem by you, when I click on tag the page redirect to the correct URL but I see this at the page:

    Can't find anything here?
    Try the following filters to extend your search

    it's work when link put in the front page (not work on latest). is this a problem or Hotaru CMS basic functionality?
     
    Last edited: Jul 3, 2016
  10. valMETNG

    valMETNG Administrator Staff Member Admin

    Can you post a screen print please?
     
  11. valMETNG

    valMETNG Administrator Staff Member Admin

    BTW and as a reminder, always make sure the plugins are in the correct order.
     
  12. noreplay

    noreplay New Member

  13. valMETNG

    valMETNG Administrator Staff Member Admin

    Thanks. Can you paste here the exact tag you're using? I'll try it in my base build and see if I can determine the problem.
     
  14. noreplay

    noreplay New Member

    for example :

    فن و مشاهیر
    or
    مشاهیر
    or any Arabic word. and you can use google translate to find your custom word.
    thanks to you for your attention. thank you very much. :)
     
  15. valMETNG

    valMETNG Administrator Staff Member Admin

    Those did seem to work in my base build:
    tag test.png
    So I'm wondering if there's something else going on in your environment. Can you please uninstall and reinstall the tag plugin and see if that corrects the problem? If not, please paste the following code onto line 133 of content/plugins/bookmarking/libs/BookmarkingFunctions.php:
    Code:
    print $h->db->prepare($prepare_array)."<br>";
    Then go to a tag page. It should display something that looks like this:
    Code:
    SELECT count(post_id) AS number FROM hotaru_posts WHERE post_archived = 'N' AND (post_status = 'top' OR post_status = 'new') AND post_tags LIKE '%%D9%81%D9%86+%D9%88+%D9%85%D8%B4%D8%A7%D9%87%DB%8C%D8%B1%' AND post_type = 'news'
    SELECT P.*, U.user_username, U.user_email FROM hotaru_posts AS P LEFT OUTER JOIN hotaru_users AS U ON P.post_author = U.user_id WHERE post_archived = 'N' AND (post_status = 'top' OR post_status = 'new') AND post_tags LIKE '%%D9%81%D9%86+%D9%88+%D9%85%D8%B4%D8%A7%D9%87%DB%8C%D8%B1%' AND post_type = 'news' ORDER BY post_date DESC
    Those are the MySQL statements that are run on your database. You can put either of those directly into your database tool (e.g., PHPMyAdmin) and they will show you the rows. However, if no rows are displayed (as I expect they won't be), we need to determine what part of the SELECT statement is limiting the rows.

    For example, if you run the second SELECT statement in your database and it comes up empty/zero rows, we need to look at your hotaru_posts table data and figure out why the appropriate post didn't come up. Does the row that you expected to come up not have a post_type of news? Or does the post_status of the row you expected to come up have something other than top or new in the field? Again, if you put this on a host somewhere and PM me temporary credentials, I can look. Otherwise, you'll need to figure out why the SELECT statements are coming up empty.
     
  16. noreplay

    noreplay New Member

    I change the line as you want: this is a result of this change:

    for URL= http://localhost/hotaru/tag/اپراتور/

    Code:
    SELECT count(post_id) AS number FROM hotaru_posts WHERE post_archived = 'N' AND post_status = 'top' AND post_tags LIKE '%%D8%A7%D9%BE%D8%B1%D8%A7%D8%AA%D9%88%D8%B1%' AND post_type = 'news'
    SELECT P.*, U.user_username, U.user_email FROM hotaru_posts AS P LEFT OUTER JOIN hotaru_users AS U ON P.post_author = U.user_id WHERE post_archived = 'N' AND post_status = 'top' AND post_tags LIKE '%%D8%A7%D9%BE%D8%B1%D8%A7%D8%AA%D9%88%D8%B1%' AND post_type = 'news' ORDER BY post_date DESC
    for URL= http://localhost/hotaru/tag/separated/

    Code:
    SELECT count(post_id) AS number FROM hotaru_posts WHERE post_archived = 'N' AND post_status = 'top' AND post_tags LIKE '%separated%' AND post_type = 'news'
    SELECT P.*, U.user_username, U.user_email FROM hotaru_posts AS P LEFT OUTER JOIN hotaru_users AS U ON P.post_author = U.user_id WHERE post_archived = 'N' AND post_status = 'top' AND post_tags LIKE '%separated%' AND post_type = 'news' ORDER BY post_date DESC
     
  17. valMETNG

    valMETNG Administrator Staff Member Admin

    As I don't have access to your environment, you're going to have to troubleshoot in your database why either of those statements aren't working.
     
  18. noreplay

    noreplay New Member

    I wondering, tags work on 1st page (link on home page) but not work on (latest page)

    I guest, I find my problem, in home page when I click on tag, the page redirect like this:
    from: http://localhost/hotaru/ ==> to: http://localhost/hotaru/tag/sample/

    but in latest page:

    from: http://localhost/hotaru/latest/ ==> to: http://localhost/hotaru/tag/sample/

    but the true page URL is: http://localhost/hotaru/latest/tag/sample/

    and when I paste this url in my browser manually, the link work fine. is it possible to my .htaccess setting was wrong?
     
    Last edited: Jul 4, 2016
  19. valMETNG

    valMETNG Administrator Staff Member Admin

    Latest and new are the same thing in Hotaru - see function prepareList on line 57 of BookmarkingFunctions.php. Here's a screen shot of the URL with latest:
    latest tags.png
     
  20. noreplay

    noreplay New Member

    Excuse Me. every things work fine. my mistake, I made my point in bad way.

    this is not bug, I work more with hotaru and I find the correct way for finding tag page. because I work with two other social bookmarking CMS before hotaru and in those CMS when you click on tag, this is happening:
    after clicking on any tag => in the front page, you redirect to front-page-tag, and after clicking on any tag => in the new page, you redirect directly to new-page-tag

    but in hotaru, after clicking on any tags, you redirect to front-page tag and after that you can change the page ,between :
    Am I understand correct?
     

Share This Page