Dev {Tricks}

  • Home
  • WordPress
  • OJS
  • Oxwall
  • Server and Hosting
You are here: Home / Archives for dev

March 29, 2022 by dev

Usage stats shows 0 in the downloaded files

    • Download statistics stop working
    • Usage stats shows 0 in the downloaded files
    • Download data is not yet available
    • How to get the Usage Statistics plugin to work
    • OJS statistics views are 0
    • usageEventLogs files are not moved to stage folder

Checklists

  • Visit Statistics > Articles in the backend, do you see any statistics?
  • Check PHP error log for details on those 500 errors
  • Check that base_url in config.inc.php is set correctly
  • Check log files in the usageStats/usageEventLogs directory (inside your OJS files_dir)
  • Check whether dB metrics is updating.
    • In the SQL database, see if there are row(s) for in the metrics table for the journal. If the journal id is 1, use the following SQL:
      select count(*) from metrics where context_id=1

      If there are no metrics, your instance may not be set up to process the usage stats logs.

  • Check to see if there is a scheduled task registered for the metrics.
    select * from scheduled_tasks;

    You should see a listing for plugins.generic.usageStats.UsageStatsLoader. If you do have that listing, your instance may not be running its scheduled tasks and may not have the correct plugins installed.

  • If UsageStatsLoader is running check whether log files being written and the plugin can find the log files for processing.
    • Look in files_dir (defined in config.inc.php) and look for the usageStats directory. In particular, look for log files in: usageStats > usageEventLogs
    • When the usage stats are processed, they are taken out of this directory for processing. You should only see logs since the last run.
    • Check usageStats > archive directory.
  • If everything looks okey
    • Lets check the journal ID
      select journal_id from journals where path="JOURNALPATH";
    • If it is 1. Then check a usage event log:
      select * from metrics where context_id=1 and load_id="usage_events_20221113.log" limit 10;

      If there are no entries for that, open up usageStats/archive/usage_events_20201113.log and see if there are any entries for the JOURNALPATH journal.

A quick test. Copy an old usageStats/archive log file into usagestats/stage and run:

php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasks.xml

Check the metrics table in the database. A new record should be added to the metrics table.

Filed Under: Help, OJS, Plugins Tagged With: acron plugin, ojs expert, ojs fix, ojs help, usage statistics

March 26, 2022 by dev

UTF-8 Encoding Debugging Chart

Table for Debugging Common UTF-8 Character Encoding Problems.
Code Point Characters UTF-8 Bytes Code Point Characters UTF-8 Bytes
Unicode Windows
1252
Expected Actual Unicode Windows
1252
Expected Actual
U+20AC 0x80 € € %E2 %82 %AC U+00C0 0xC0 À À %C3 %80
0x81 U+00C1 0xC1 Á Ã %C3 %81
U+201A 0x82 ‚ ‚ %E2 %80 %9A U+00C2 0xC2  Â %C3 %82
U+0192 0x83 ƒ Æ’ %C6 %92 U+00C3 0xC3 à Ã %C3 %83
U+201E 0x84 „ „ %E2 %80 %9E U+00C4 0xC4 Ä Ã„ %C3 %84
U+2026 0x85 … … %E2 %80 %A6 U+00C5 0xC5 Å Ã… %C3 %85
U+2020 0x86 † †%E2 %80 %A0 U+00C6 0xC6 Æ Ã† %C3 %86
U+2021 0x87 ‡ ‡ %E2 %80 %A1 U+00C7 0xC7 Ç Ã‡ %C3 %87
U+02C6 0x88 ˆ ˆ %CB %86 U+00C8 0xC8 È Ãˆ %C3 %88
U+2030 0x89 ‰ ‰ %E2 %80 %B0 U+00C9 0xC9 É Ã‰ %C3 %89
U+0160 0x8A Š Å %C5 %A0 U+00CA 0xCA Ê ÃŠ %C3 %8A
U+2039 0x8B ‹ ‹ %E2 %80 %B9 U+00CB 0xCB Ë Ã‹ %C3 %8B
U+0152 0x8C Œ Å’ %C5 %92 U+00CC 0xCC Ì ÃŒ %C3 %8C
0x8D U+00CD 0xCD Í Ã %C3 %8D
U+017D 0x8E Ž Å½ %C5 %BD U+00CE 0xCE Î ÃŽ %C3 %8E
0x8F U+00CF 0xCF Ï Ã %C3 %8F
0x90 U+00D0 0xD0 Ð Ã %C3 %90
U+2018 0x91 ‘ ‘ %E2 %80 %98 U+00D1 0xD1 Ñ Ã‘ %C3 %91
U+2019 0x92 ’ ’ %E2 %80 %99 U+00D2 0xD2 Ò Ã’ %C3 %92
U+201C 0x93 “ “ %E2 %80 %9C U+00D3 0xD3 Ó Ã“ %C3 %93
U+201D 0x94 ” †%E2 %80 %9D U+00D4 0xD4 Ô Ã” %C3 %94
U+2022 0x95 • • %E2 %80 %A2 U+00D5 0xD5 Õ Ã• %C3 %95
U+2013 0x96 – – %E2 %80 %93 U+00D6 0xD6 Ö Ã– %C3 %96
U+2014 0x97 — — %E2 %80 %94 U+00D7 0xD7 × Ã— %C3 %97
U+02DC 0x98 ˜ Ëœ %CB %9C U+00D8 0xD8 Ø Ã˜ %C3 %98
U+2122 0x99 ™ â„¢ %E2 %84 %A2 U+00D9 0xD9 ٠Ù %C3 %99
U+0161 0x9A š Å¡ %C5 %A1 U+00DA 0xDA Ú Ãš %C3 %9A
U+203A 0x9B › › %E2 %80 %BA U+00DB 0xDB Û Ã› %C3 %9B
U+0153 0x9C œ Å“ %C5 %93 U+00DC 0xDC Ü Ãœ %C3 %9C
0x9D U+00DD 0xDD Ý Ã %C3 %9D
U+017E 0x9E ž ž %C5 %BE U+00DE 0xDE Þ Ãž %C3 %9E
U+0178 0x9F Ÿ Ÿ %C5 %B8 U+00DF 0xDF ß ÃŸ %C3 %9F
U+00A0 0xA0 Â %C2 %A0 U+00E0 0xE0 à Ã %C3 %A0
U+00A1 0xA1 ¡ ¡ %C2 %A1 U+00E1 0xE1 á á %C3 %A1
U+00A2 0xA2 ¢ ¢ %C2 %A2 U+00E2 0xE2 â â %C3 %A2
U+00A3 0xA3 £ £ %C2 %A3 U+00E3 0xE3 ã ã %C3 %A3
U+00A4 0xA4 ¤ ¤ %C2 %A4 U+00E4 0xE4 ä ä %C3 %A4
U+00A5 0xA5 ¥ Â¥ %C2 %A5 U+00E5 0xE5 å Ã¥ %C3 %A5
U+00A6 0xA6 ¦ ¦ %C2 %A6 U+00E6 0xE6 æ æ %C3 %A6
U+00A7 0xA7 § § %C2 %A7 U+00E7 0xE7 ç ç %C3 %A7
U+00A8 0xA8 ¨ ¨ %C2 %A8 U+00E8 0xE8 è è %C3 %A8
U+00A9 0xA9 © © %C2 %A9 U+00E9 0xE9 é é %C3 %A9
U+00AA 0xAA ª ª %C2 %AA U+00EA 0xEA ê ê %C3 %AA
U+00AB 0xAB « « %C2 %AB U+00EB 0xEB ë ë %C3 %AB
U+00AC 0xAC ¬ ¬ %C2 %AC U+00EC 0xEC ì ì %C3 %AC
U+00AD 0xAD ­ ­ %C2 %AD U+00ED 0xED í í %C3 %AD
U+00AE 0xAE ® ® %C2 %AE U+00EE 0xEE î î %C3 %AE
U+00AF 0xAF ¯ ¯ %C2 %AF U+00EF 0xEF ï ï %C3 %AF
U+00B0 0xB0 ° ° %C2 %B0 U+00F0 0xF0 ð ð %C3 %B0
U+00B1 0xB1 ± ± %C2 %B1 U+00F1 0xF1 ñ ñ %C3 %B1
U+00B2 0xB2 ² ² %C2 %B2 U+00F2 0xF2 ò ò %C3 %B2
U+00B3 0xB3 ³ ³ %C2 %B3 U+00F3 0xF3 ó ó %C3 %B3
U+00B4 0xB4 ´ ´ %C2 %B4 U+00F4 0xF4 ô ô %C3 %B4
U+00B5 0xB5 µ µ %C2 %B5 U+00F5 0xF5 õ õ %C3 %B5
U+00B6 0xB6 ¶ ¶ %C2 %B6 U+00F6 0xF6 ö ö %C3 %B6
U+00B7 0xB7 · · %C2 %B7 U+00F7 0xF7 ÷ ÷ %C3 %B7
U+00B8 0xB8 ¸ ¸ %C2 %B8 U+00F8 0xF8 ø ø %C3 %B8
U+00B9 0xB9 ¹ ¹ %C2 %B9 U+00F9 0xF9 ù ù %C3 %B9
U+00BA 0xBA º º %C2 %BA U+00FA 0xFA ú ú %C3 %BA
U+00BB 0xBB » » %C2 %BB U+00FB 0xFB û û %C3 %BB
U+00BC 0xBC ¼ ¼ %C2 %BC U+00FC 0xFC ü ü %C3 %BC
U+00BD 0xBD ½ ½ %C2 %BD U+00FD 0xFD ý ý %C3 %BD
U+00BE 0xBE ¾ ¾ %C2 %BE U+00FE 0xFE þ þ %C3 %BE
U+00BF 0xBF ¿ ¿ %C2 %BF U+00FF 0xFF ÿ ÿ %C3 %BF

Filed Under: Miscellaneous Tagged With: unicode, utf-8, utf-8 debug, utf-8 unicode

March 17, 2022 by dev

Dimensions Badge integration on OJS

It is not hard to integrate Dimension Badge in OJS. Under /templates/frontend/object/ find and open article_detail.tpl and enter bellow code where you want to the badge.

<span class="__dimensions_badge_embed__" data-doi="{$pubId}" data-legend="always" data-style="small_circle"></span><script async src="https://badge.dimensions.ai/badge.js" charset="utf-8"></script>

You can find more details at https://badge.dimensions.ai/

You can register your journals (free or paid) at Dimensions Badges and Metrics API at https://www.dimensions.ai/metricssignup/

 

Filed Under: Help, OJS

March 13, 2022 by dev

PHP Fatal Error: Uncaught Error: Call to undefined function – OJS

bindtextdomain

  • Error 500 while setting distribution
  • The 500 error in registration page
  • PHP Fatal error: Uncaught Error: Call to undefined function bindtextdomain() in /lib/pkp/lib/vendor/sokil/php-isocodes/src/AbstractDatabase.php:87
  • Failed AJAX request or invalid JSON returned

If you get a message like this:

PHP Fatal Error: Uncaught Error: Call to undefined function bindtextdomain() in ...

…then your PHP installation is missing support for the gettext extension. You need to install or enable it.

 

Filed Under: Frontend, Help, Installation, Issues, legacy, OJS, Plugins, Templates, Theme, Theme Customization, Theme Development, TPL CSS JS, Upgrade Tagged With: AbstractDatabase, AJAX, Call to undefined function, Error 500, gettext, JSON, ojs, PHP Fatal Error, Uncaught Error

March 11, 2022 by dev

Failed Ajax request or invalid JSON returned

  • Failed Ajax request or invalid JSON returned

Cause

This warning is cosmetic, but because it’s being sent out to the browser, it’s interfering with the JSON response.

Solution

Configure your PHP so that errors/warnings are sent to the log, not the browser.

PHP setting

display_errors = Off

Check PHP Extension

gettext extension

Check file permission and ownership

 

 

Filed Under: Help, OJS

  • « Previous Page
  • 1
  • …
  • 23
  • 24
  • 25
  • 26
  • 27
  • …
  • 91
  • Next Page »
  • Upwork
  • Freelancer
  • Fiverr
  • Guru

www.ojsexpert.com
www.ojsdev247.com

Recent Posts

  • To get your email for castamodel.com going to the right place, you need to update your DNS settings.
  • Security and WordPress
  • ROR
  • How do we copy google form to google workspace?
  • Install ImageMagick – Almalinux
  • How to remove /public/ from URL in Laravel
  • How to install Maldet alert?
  • How to Install Maldet and Run a Scan | Maldetect
  • Where is Roundcube location on CWP control panel?
  • How To Add Node.js Projects In aaPanel?
  • SPF/DKIM/DMARC Tools
  • Associative arrays – How to loop over Associative arrays
  • Indexed Arrays. How to loop over Indexed Arrays.
  • PHP Break | Continue
  • For Loop | While Loop | Do…While Loop | Foreach Loop
  • Strict mode in PHP
  • PHP Function Return Types
  • PHP Anonymous Functions (or Closures)
  • PHP Variadic Functions
  • PHP nullable type hints

Categories

  • Affiliate Marketing (1)
  • Customization (4)
    • CSS (2)
  • Email Solutions (23)
    • FrontApp (2)
    • Google Spreadsheet (2)
    • Microsoft Outlook (1)
    • PHP Email Form (3)
    • PolyMail (2)
    • Recaptcha (1)
    • Roundcube (4)
    • Thunderbird (3)
    • WebMail (5)
  • Games (1)
  • How to (87)
  • Joomla (6)
    • Akeeba (1)
    • Fix & Tricks (3)
  • jQuery (4)
  • jQuery Plugins (4)
    • BX Slider (1)
    • Slick (1)
  • Laravel (5)
  • Marketplace (5)
  • Miscellaneous (31)
  • MultiSaaS (1)
  • OJS (56)
    • Crossref (1)
    • Help (37)
    • Installation (10)
      • Issues (5)
    • Plugins (8)
    • Scholar Indexing (2)
    • Theme (7)
      • Templates (7)
        • Frontend (6)
        • legacy (1)
    • Theme Customization (10)
    • Theme Development (14)
    • TPL CSS JS (2)
    • Upgrade (11)
  • OSTAD (17)
  • Oxwall (3)
  • Payment Methods (1)
    • Paypal (1)
  • PC Tips and Tricks (14)
    • MS Office (2)
      • PowerPoint (1)
    • Windows (4)
  • PHP Parse error (2)
  • phpBB (2)
  • Server and Hosting (213)
    • Billing and Management (10)
      • Blesta (5)
      • Boxbilling (2)
      • WHMCS (5)
    • Email (10)
      • Postfix (3)
    • Error and Fix (17)
    • FTP (2)
    • Linux Distribusion (28)
      • Almalinux (13)
      • CentOS (17)
      • Debian (21)
      • Ubuntu (19)
    • Mail Server Solusion (7)
      • iRedMain (6)
    • MySQL (12)
    • Providers (69)
      • AWS (37)
      • Bluehost (37)
      • Cloudcone (26)
      • Contabo (40)
      • Digitalocean (68)
      • Hetzner (3)
      • HostGator (36)
      • Hostinger (8)
      • RackNerd (10)
      • VPSDime (38)
    • Security (21)
      • SSH (8)
    • VPS Management (72)
    • Web Control Panel (147)
      • aaPanel (14)
      • CentOS Web Panel (46)
      • cPanel (33)
      • CyberPanel (7)
      • DirectAdmin (96)
        • Find & fix (38)
      • ISPConfig (17)
      • KeyHelp (7)
      • Plesk (26)
      • Webmin (25)
        • Usermin (2)
        • Virtualmin (13)
      • WHM (18)
  • Uncategorized (19)
  • Wordpress (89)
    • Elementor (2)
    • Find and Fix (11)
    • Functions (5)
    • Genesis (9)
    • Glossary (1)
    • How to (22)
    • Neuron TD (15)
      • Console Error (1)
      • functions (5)
        • register_post_type (1)
        • register_sidebar (1)
        • theme_files (1)
        • theme_supports (1)
      • Image Directory (1)
      • Menu (2)
      • Query (4)
    • Plugins (13)
      • Contact Form 7 (5)
      • Duplicator (1)
      • Essential Grid (2)
    • Softaculous (3)
    • Speed and Security (4)
    • Stock Theme Development (6)
      • Header Footer (1)
      • PHP (1)
      • VC (1)
    • Theme Development (2)
      • Issues (1)
      • Menu (1)
    • Timer Theme Development (3)
    • Update (2)
    • Woocommerce (2)
    • WP Basic Guideline (8)

Important DEV links

  • Premium Themes
    • Themeforest
    • Envato Market
  • Built With (What Theme is That?)
    • What WP theme is that
    • Joomla Template Detector
    • Drupal Template Detector
    • Prestashop Template Detector
    • Shopify Theme Detector
    • Squarespace Template Detector
    • OpenCart Detector
    • WordPress.com Theme Detector
  • Domain/IP history checker
    • Who IS request
    • Hosting Info
  • Check DNS Propagation
    • DNS Checker
    • intoDNS
  • What is my IP
    • What is My IP Address
    • What is My IP
    • IP location
    • What is My IP
    • Porkbun
  • SEO Tools
    • Visitor Traffic
    • Broken Link
    • Website Speed Test
      • SEMrush
      • GTmetrix
      • Pingdom
      • PageSpeed Insights
      • DebugBear
      • keyCDN
  • Photo Image
    • Remove Background 50 Free Preview Image 375 × 666 per month
  • Domain Registrars
    • 123-Reg
    • Porkbun
    • Freenom
    • Namecheap NEWCOM598
  • Hosting Providers
    • Bluehost
    • Hostgator
    • Inmotion
  • Hosting Control Panel
    • CWPpro (FREE)
    • DirectAdmin (Trial 60 Days, One account $2/month)
    • ISPConfig (Free)
  • Webmaster Tools
    • Google
    • Bing
    • Yandex
  • Miscellaneous
    • Time Calculator

 

Categories

  • Affiliate Marketing (1)
  • Customization (4)
    • CSS (2)
  • Email Solutions (23)
    • FrontApp (2)
    • Google Spreadsheet (2)
    • Microsoft Outlook (1)
    • PHP Email Form (3)
    • PolyMail (2)
    • Recaptcha (1)
    • Roundcube (4)
    • Thunderbird (3)
    • WebMail (5)
  • Games (1)
  • How to (87)
  • Joomla (6)
    • Akeeba (1)
    • Fix & Tricks (3)
  • jQuery (4)
  • jQuery Plugins (4)
    • BX Slider (1)
    • Slick (1)
  • Laravel (5)
  • Marketplace (5)
  • Miscellaneous (31)
  • MultiSaaS (1)
  • OJS (56)
    • Crossref (1)
    • Help (37)
    • Installation (10)
      • Issues (5)
    • Plugins (8)
    • Scholar Indexing (2)
    • Theme (7)
      • Templates (7)
        • Frontend (6)
        • legacy (1)
    • Theme Customization (10)
    • Theme Development (14)
    • TPL CSS JS (2)
    • Upgrade (11)
  • OSTAD (17)
  • Oxwall (3)
  • Payment Methods (1)
    • Paypal (1)
  • PC Tips and Tricks (14)
    • MS Office (2)
      • PowerPoint (1)
    • Windows (4)
  • PHP Parse error (2)
  • phpBB (2)
  • Server and Hosting (213)
    • Billing and Management (10)
      • Blesta (5)
      • Boxbilling (2)
      • WHMCS (5)
    • Email (10)
      • Postfix (3)
    • Error and Fix (17)
    • FTP (2)
    • Linux Distribusion (28)
      • Almalinux (13)
      • CentOS (17)
      • Debian (21)
      • Ubuntu (19)
    • Mail Server Solusion (7)
      • iRedMain (6)
    • MySQL (12)
    • Providers (69)
      • AWS (37)
      • Bluehost (37)
      • Cloudcone (26)
      • Contabo (40)
      • Digitalocean (68)
      • Hetzner (3)
      • HostGator (36)
      • Hostinger (8)
      • RackNerd (10)
      • VPSDime (38)
    • Security (21)
      • SSH (8)
    • VPS Management (72)
    • Web Control Panel (147)
      • aaPanel (14)
      • CentOS Web Panel (46)
      • cPanel (33)
      • CyberPanel (7)
      • DirectAdmin (96)
        • Find & fix (38)
      • ISPConfig (17)
      • KeyHelp (7)
      • Plesk (26)
      • Webmin (25)
        • Usermin (2)
        • Virtualmin (13)
      • WHM (18)
  • Uncategorized (19)
  • Wordpress (89)
    • Elementor (2)
    • Find and Fix (11)
    • Functions (5)
    • Genesis (9)
    • Glossary (1)
    • How to (22)
    • Neuron TD (15)
      • Console Error (1)
      • functions (5)
        • register_post_type (1)
        • register_sidebar (1)
        • theme_files (1)
        • theme_supports (1)
      • Image Directory (1)
      • Menu (2)
      • Query (4)
    • Plugins (13)
      • Contact Form 7 (5)
      • Duplicator (1)
      • Essential Grid (2)
    • Softaculous (3)
    • Speed and Security (4)
    • Stock Theme Development (6)
      • Header Footer (1)
      • PHP (1)
      • VC (1)
    • Theme Development (2)
      • Issues (1)
      • Menu (1)
    • Timer Theme Development (3)
    • Update (2)
    • Woocommerce (2)
    • WP Basic Guideline (8)
  • Home
  • WordPress
  • OJS
  • Oxwall
  • Server and Hosting

Copyright © 2025 · Executive Pro Theme on Genesis Framework · WordPress · Log in